Several WebUI styling broken because of :host Blink CSS specificity change. |
||||
Issue descriptionGo to chrome://settings. See ripples. This probably affects other WebUI pages as well. Bisect range https://chromium.googlesource.com/chromium/src/+log/8ba9303db4eaf48e6136f6c4a05e7ec8719d1762..1ef23c9360a771f0cadb5717262a4bbe0f0e5cdc Suspecting https://chromium-review.googlesource.com/c/chromium/src/+/1238445 @emilio: Can you take a look? I already verified that reverting that CL fixes the problem.
,
Sep 27
I verified that this CL causes lot of styling breakages across various WebUIs. See attachments. Some of these reproduce only with optimize_webui=false GN flag, and some with both true/false. Even though the original CL seems to be fixing something to be according to spec, it seems that several places across Chrome code rely on the existing CSS specificity. We should fix those first, before relanding the Blink change (will send a revert shortly).
,
Sep 27
,
Sep 27
,
Sep 27
Sure, I'll take a look. I need to rebuild though so I might not be able to get to it properly until tomorrow. This changed some selectors' specificity, could you point me to where the CSS of those pages live? A revert for now sounds fine though, specially given it's a simple change. Thanks.
,
Sep 27
Also, sorry for the breakage :(
,
Sep 27
If you could avoid reverting the WPT tests it'd be great, if it's possible.
,
Sep 27
- The mispositioned ripples exist on various elements under [1] (cr-radio-button, cr-toggle, cr-checkbox). - The button styling exists under 2 and 3 (they are both applied at the same time) - The pink FAB (floating action buttons) styling is under [4] and [5]. Note that optimize_webui=true vs false changes the final CSS, so that explains why some bugs only occur in one of the two configurations. Also note, that these are just the breakages identified with a very short audit. Most likely there are more. [1] https://cs.chromium.org/chromium/src/ui/webui/resources/cr_elements/ [2] https://cs.chromium.org/chromium/src/ui/webui/resources/cr_elements/paper_button_style_css.html [3] https://cs.chromium.org/chromium/src/third_party/polymer/v1_0/components-chromium/paper-button/paper-button.html [4] https://cs.chromium.org/chromium/src/chrome/browser/resources/pdf/elements/viewer-zoom-toolbar/viewer-zoom-button.html [5] https://cs.chromium.org/chromium/src/third_party/polymer/v1_0/components-chromium/paper-fab/paper-fab.html
,
Sep 27
> If you could avoid reverting the WPT tests it'd be great, if it's possible. I just clicked "revert" via gerrit, which will revert the entire CL. Do you want me to cancel that, and let you send a more specific revert?
,
Sep 27
Never mind, the revert already landing. Sorry for not seeing your comment earlier.
,
Sep 27
Yeah, is alright, I can submit the tests separately :)
,
Sep 27
Revert landed so marking this as fixed, https://chromium-review.googlesource.com/c/chromium/src/+/1250054. Let's stay in touch before when a new CL is attempted to ensure all breakages have been identified (might take a while to fix though). Thanks!
,
Sep 27
This would be a problem with Polymer in general, right?
,
Sep 27
> This would be a problem with Polymer in general, right? It is possible that some of the Polymer UI elements [1] are relying on the previous behavior as well. If I had to guess, both Chromium and third_party/polymer code might need to be tweaked. [1] https://cs.chromium.org/chromium/src/third_party/polymer/v1_0/components-chromium/
,
Sep 27
Hmm, are those elements broken in WebKit and Gecko then? That looks bad.
,
Sep 27
WebUI code only runs in Chrome, so not sure whether Polymer third_party elements behave on WebKit or Gecko.
,
Sep 27
If this is Shadow DOM v0, we possibly need to keep the old specificity for sheets in v0 trees.
,
Sep 27
The breakages reported here are with Shadow DOM v0. I did not check whether they reproduce with Shadow DOM v1 (you can do so by adding --enable-features=WebUIPolymer2 in the command line, migration is still in progress, tracked by issue 738611). |
||||
►
Sign in to add a comment |
||||
Comment 1 by dpa...@chromium.org
, Sep 27Components: Blink>CSS
Summary: Settings WebUI: Ripples are mispositioned (was: Ripples are mispositioned)