Any way for CSS selector to apply when a property is NOT set?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Any way for CSS selector to apply when a property is NOT set?

Jonathan Kamens
I need to style the background image of rows in the
Thunderbird thread pane, but only for the rows that are NOT
currently selected.

I want the row that is currently selected to have the default
backround image styling.

It looks like TB sets the "selected" property on the selected
row, but does not set a property on all the rows that are not
selected.

Is there anyway for my CSS selector to indicate that a
particular style block only applies for rows that do NOT have
a certain property (in this case, "selected") set on them?

Thanks.
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Any way for CSS selector to apply when a property is NOT set?

Neil-4
Jonathan Kamens wrote:

>I need to style the background image of rows in the Thunderbird thread pane, but only for the rows that are NOT currently selected.
>
>I want the row that is currently selected to have the default backround image styling.
>
>It looks like TB sets the "selected" property on the selected row, but does not set a property on all the rows that are not selected.
>
>Is there anyway for my CSS selector to indicate that a particular style block only applies for rows that do NOT have a certain property (in this case, "selected") set on them?
>  
>
Sorry, but I don't think we support any form of ":not" pseudoclass for
tree pseudoelements.

--
Warning: May contain traces of nuts.
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Any way for CSS selector to apply when a property is NOT set?

Jim-267
On 04/22/2012 02:15 PM, Neil wrote:
> Jonathan Kamens wrote:
>> Is there anyway for my CSS selector to indicate that a particular
>> style block only applies for rows that do NOT have a certain property
>> (in this case, "selected") set on them?
>>
> Sorry, but I don't think we support any form of ":not" pseudoclass for
> tree pseudoelements.

It should be possible to write a rule for all rows and then "undo" the
CSS for the |selected| property.

- Jim
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Any way for CSS selector to apply when a property is NOT set?

Ron K.
In reply to this post by Neil-4
Neil on 4/22/2012 3:15 PM, keyboarded a reply:

> Jonathan Kamens wrote:
>
>> I need to style the background image of rows in the Thunderbird thread
>> pane, but only for the rows that are NOT currently selected.
>>
>> I want the row that is currently selected to have the default backround
>> image styling.
>>
>> It looks like TB sets the "selected" property on the selected row, but
>> does not set a property on all the rows that are not selected.
>>
>> Is there anyway for my CSS selector to indicate that a particular style
>> block only applies for rows that do NOT have a certain property (in this
>> case, "selected") set on them?
>>
>>
> Sorry, but I don't think we support any form of ":not" pseudoclass for
> tree pseudoelements.
>

Invert the concept. Write a new rule for all rows that overrides the
theme. Then use a new rule that is cloned from the theme to apply the
theme default. Down side is the thread pane global style is likely to
clash with non-default themes. Plus there will be conflicts with users
like me who already have !important rules declared in our userChrome.css.


--
Ron K.
Who is General Failure, and why is he searching my HDD?
Kernel Restore reported Major Error used BSOD to msg the enemy!
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Any way for CSS selector to apply when a property is NOT set?

Jonathan Kamens-4
In reply to this post by Jim-267
Jim <[hidden email]> writes:
>It should be possible to write a rule for all rows and then "undo" the
>CSS for the |selected| property.

I don't see how to "undo" a background-image style setting in
a way that would restore whatever background-color setting(s)
would otherwise be applied by the team. Can you be more
specific?
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Any way for CSS selector to apply when a property is NOT set?

Jonathan Kamens-4
In reply to this post by Neil-4
Neil <[hidden email]> writes:
>Sorry, but I don't think we support any form of ":not" pseudoclass for
>tree pseudoelements.

Well, if I wanted to either (a) convince somebody to add such
support, or (b) convince somebody to add an "unselected"
property to the rows that aren't currently selected, which do
you think would be more likely to be successful? :-)
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Any way for CSS selector to apply when a property is NOT set?

Jonathan Kamens-4
In reply to this post by Ron K.
"Ron K." <[hidden email]> writes:
>Invert the concept. Write a new rule for all rows that overrides the
>theme. Then use a new rule that is cloned from the theme to apply the
>theme default. Down side is the thread pane global style is likely to
>clash with non-default themes.

Which is exactly why I won't do that.
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Any way for CSS selector to apply when a property is NOT set?

Jim-267
In reply to this post by Jonathan Kamens-4
On 04/22/2012 03:58 PM, Jonathan Kamens wrote:
> Jim <[hidden email]> writes:
>> It should be possible to write a rule for all rows and then "undo" the
>> CSS for the |selected| property.
>
> I don't see how to "undo" a background-image style setting in
> a way that would restore whatever background-color setting(s)
> would otherwise be applied by the team. Can you be more
> specific?

Just figure out what the CSS would have been and write rules to apply
that. If you're worried about writing hacky code in your add-on, don't.
That's the nature of add-on development sometimes. You should see some
of the hacks I've had to employ in my add-ons.

- Jim
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Any way for CSS selector to apply when a property is NOT set?

Neil-4
In reply to this post by Jonathan Kamens-4
Jonathan Kamens wrote:

>Neil <[hidden email]> writes:
>  
>
>>Sorry, but I don't think we support any form of ":not" pseudoclass for tree pseudoelements.
>>    
>>
>Well, if I wanted to either (a) convince somebody to add such support, or (b) convince somebody to add an "unselected" property to the rows that aren't currently selected, which do you think would be more likely to be successful? :-)
>  
>
(b) would definitely be easier to implement, because you'd probably have
to change the CSS parser for (a). But on the other hand, I don't think
(b) would be as popular with the module owners. Of course, you could
just file both bugs, and await developments...

--
Warning: May contain traces of nuts.
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird