Open Bug 2061754 Opened 26 days ago Updated 16 days ago

userContent settings for ::selection ignored in 153.0.2esr, works in 153.0.2

Categories

(Thunderbird :: Message Reader UI, defect)

Thunderbird 153
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: fstboard-mozilla, Unassigned)

Details

Attachments

(4 files)

Steps to reproduce:

I've this code in my userContent.css:

::selection {
  background-color:red!important;
  color:green!important;
}

and it used to work in TB 140esr. After switching to 153esr (currently 153.0.2esr) these settings are ignored. Selected text in mail body has a blue background (#3584e4), not a red one.
I've downloaded the 153.0.2 and 153.0.2esr versions from https://archive.mozilla.org/pub/thunderbird/releases/153.0.2{esr}/linux-x86_64/en-US/ and started both with the same profile. In 153.0.2 the selection has a red background, in 153.0.2esr a blue one (same blue as when I remote the ::selection rule in 153.0.2 or 140esr).

So the ::selection is ignored only in the esr version. Other settings from userContent.css still work fine.

Flags: needinfo?(richard.marti)

I can't reproduce your issue because I never see your selection colours. Not on TB 140 or newer on Linux and Windows.

I can't say what happens.

Flags: needinfo?(richard.marti)

In 153.0.2 the selection has a red background, in 153.0.2esr a blue one (same blue as when I remote the ::selection rule in 153.0.2 or 140esr).

It's very hard to imagine that these two versions would behave differently.

Please check the error console for warnings and errors.

Flags: needinfo?(fstboard-mozilla)
Attached image console message 153.0.2

Well, I'm a little lost on how to debug this further. Just re-downloaded the tar.xz files and unpacked them and created a new empty profile with just a draft and the userContent.css as above. And with 153 it works, with esr it doesn't, please see the attached screenshots (used red background and white foreground in the css this time). Message consoles are also identical as you can see.

That it doesn't work only in 153 esr but does in 153 non-esr was figured out by someone else when I was first asking at https://www.thunderbird-mail.de/forum/thread/98497-tb-153-ignoriert-selection/. That is a german forum, sorry! But as we have only the esr version as default at our chair I didn't realize that it works in 153 non-esr until dharkness21 told me in that thread and I tested both 153 versions in parallel.

Is there anything else I can test or debug to figure out why it works in 153 but not in 153 esr?

Oh, I think I messed up the attachments, didn't mean to create 4 separate comments for it. Sorry!

Flags: needinfo?(fstboard-mozilla)

Behaviour remains with 153.0.3 esr and non-esr.

Is toolkit.legacyUserProfileCustomizations.stylesheets enabled in both profiles?

I'm indeed using the same single profile with both binaries. And I've also added some other immediately visible setting to make sure the userContent.css is considered at all. There must be some difference in the binaries (build options, patches,...?).

I can confirm this bug.
Tested with 153.0.3, 153.0.3esr, 154b4, 156a1(2026-08-16) on Windows 64bit:
If included in the userContent.css the ::selection pseudo element only works in the release version, while the ::first-line pseudo element works in all four versions.
If the ::selection pseudo element is included into messageBody.css (via toolbox/style editor and not also into userContent.css), it works in all versions. If included into both files, only the release version works (seems that the userContent.css takes precedence over the messageBody.css)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: