Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

4 views
Skip to first unread message

Jonathan Kamens

unread,
Apr 22, 2012, 11:41:13 AM4/22/12
to
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.

Neil

unread,
Apr 22, 2012, 3:15:26 PM4/22/12
to
Sorry, but I don't think we support any form of ":not" pseudoclass for
tree pseudoelements.

--
Warning: May contain traces of nuts.

Jim

unread,
Apr 22, 2012, 3:21:48 PM4/22/12
to
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

Ron K.

unread,
Apr 22, 2012, 3:43:38 PM4/22/12
to
Neil on 4/22/2012 3:15 PM, keyboarded a reply:
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!

Jonathan Kamens

unread,
Apr 22, 2012, 4:59:36 PM4/22/12
to
Neil <ne...@parkwaycc.co.uk> 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? :-)

Jonathan Kamens

unread,
Apr 22, 2012, 4:58:45 PM4/22/12
to
Jim <squibblyf...@gmail.com> 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?

Jonathan Kamens

unread,
Apr 22, 2012, 4:59:56 PM4/22/12
to
"Ron K." <kil...@gisco.net> 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.

Jim

unread,
Apr 22, 2012, 5:13:36 PM4/22/12
to
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

Neil

unread,
Apr 22, 2012, 7:34:06 PM4/22/12
to
(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...
0 new messages