Port bug 1624482: Scope menulist styles to its own component using shadow DOM
Categories
(Thunderbird :: Theme, task)
Tracking
(Not tracked)
People
(Reporter: Paenglab, Assigned: Paenglab)
References
Details
Attachments
(3 files, 1 obsolete file)
|
33.03 KB,
patch
|
mkmelin
:
feedback+
|
Details | Diff | Splinter Review |
|
3.10 KB,
patch
|
Details | Diff | Splinter Review | |
|
5.91 KB,
patch
|
Details | Diff | Splinter Review |
bug 1624482 moved some elements into shadow-DOM.
| Assignee | ||
Comment 1•5 years ago
|
||
This patch hopefully fixes the CSS. But in mailWidgets.js it needs more work as the editable menulists are broken.
Not really tested as Windows build is busted.
| Assignee | ||
Comment 2•5 years ago
|
||
I checked the normal menulists and they should be okay now.
I played a bit with mailWidgets.js and tried to convert the textbox in the editable menulists the menulist-input and textbox-input classes are now the ::part(text-input) in the CSS. The editable menulist is now almost normally shown but without label and the textbox doesn't work. This needs now a CE expert, like you Magnus, to fix it. ;-)
Comment 3•5 years ago
|
||
Some fixes to your patch.
But the hightlightable-label is giving me headaches. It won't stop showing
https://hg.mozilla.org/mozilla-central/rev/86530e261ad5#l19.58
The menulist::part(label-box) rule from messengercompose.css is getting picked up, but not stuff below it. Is it not allowed to select thing below a part, or not working?
Updated•5 years ago
|
Comment 4•5 years ago
|
||
Comment 5•5 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #3)
Created attachment 9139568 [details] [diff] [review]
1628701-editable-part-fix.patchSome fixes to your patch.
But the hightlightable-label is giving me headaches. It won't stop showing
https://hg.mozilla.org/mozilla-central/rev/86530e261ad5#l19.58The menulist::part(label-box) rule from messengercompose.css is getting picked up, but not stuff below it. Is it not allowed to select thing below a part, or not working?
You should just put <link rel="stylesheet" href="chrome://global/skin/menulist.css"/> inside the markup, and then the rules from https://hg.mozilla.org/mozilla-central/rev/86530e261ad5#l19.58 will apply.
I think that's desired anyway, since menulist-editable used class names from menulist, so you'll want all the styles formerly applying to menulist to apply to menulist-editable children as well.
Alternatively, elements can have multiple parts, so you can use part="label highlightable-label", and since the [highlightable] attribute inherits from the parent, target it as: menulist[highlightable]::part(highlightable-label) and such.
Comment 6•5 years ago
|
||
Thanks, that seems to work! I'll fold these and land it.
For toolkit: was the highlightable-label part="label" intended?
There seem to be some minor things still to do (e.g. the description in the menulist doesn't have the same faded color as before), but we can do a followup patch.
Comment 7•5 years ago
|
||
This needs both Magnus and Richard's patches applied.
- I've imported menulist.css from toolkit into the markup
- I've removed unnecessary IDs and classes
- I've fixed .menulist-description styling
- I've removed some code I think is dead (menulist-editable-box/menulist-editable-input)
Comment 8•5 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #6)
Thanks, that seems to work! I'll fold these and land it.
For toolkit: was the highlightable-label part="label" intended?
Yep, part is like class, multiple elements can share the same part. When we style the label, we usually want to style both labels at the same time.
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/27f756d7fac7
Port bug 1624482: Scope menulist styles to its own component using shadow DOM. r=mkmelin
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
| Comment hidden (Intermittent Failures Robot) |
Updated•5 years ago
|
Description
•