-
Notifications
You must be signed in to change notification settings - Fork 677
Bug 1486527: Use :is(…) selector and PostCSS to improve indicator snugging #4884
Bug 1486527: Use :is(…) selector and PostCSS to improve indicator snugging #4884
Conversation
Thanks @ExE-Boss.
Is this what you are expecting? Or are there supposed to be additional rules for Edge and Firefox? |
It’s supposed to be expanded using /* If there are 2 indicators in close proximity, snug them up.
Too many combinations to do them all but this
should take care of most common combinations */
.warning + .warning,
.overheadIndicator + .warning,
.note + .warning,
.warning + .overheadIndicator,
.overheadIndicator + .overheadIndicator,
.note + .overheadIndicator,
.warning + .note,
.overheadIndicator + .note,
.note + .note,
.warning + p:empty + .warning,
.overheadIndicator + p:empty + .warning,
.note + p:empty + .warning,
.warning + p:empty + .overheadIndicator,
.overheadIndicator + p:empty + .overheadIndicator,
.note + p:empty + .overheadIndicator,
.warning + p:empty + .note,
.overheadIndicator + p:empty + .note,
.note + p:empty + .note {
margin-top: -15px; } |
Sorry, we have quite a few things to fix before we can add PostCSS to our production asset toolchain. That's tracked in bug 1366868 (PostCSS) and bug 1380419 (Refactor static asset generation), but both bugs are a bit stale. We have a number of front-end changes planned, so I'm optimistic we'll do this work this quarter. |
Thanks for bug 1486527, and updating this PR. The same @ExE-Boss - how do you feel about getting the "compiled" version into |
(in reply to @jwhitlock from #4884 (comment))
All right, I’ll add the compiled version before the |
review?(@jwhitlock): I’ve added |
I've cherry-picked the CSS changes, including the expanded CSS, into PR #4958. I'm uncomfortable bringing in PostCSS and plugins, because I think it is confusing that you can use them for local front-end development but that they aren't applied for the CSS that shows up on MDN. Also, I still plan on fixing bug 1366868 (PostCSS) by the end of the year, and I think this PR is a good demonstration of why we'd want it. |
With the time remaining in the year, PostCSS won't be until next year, Q1 or Q2. |
Let's revisit this idea when we have a new asset pipeline, and when the standards folks decide what the selector should look like. |
Fixes bug 1486527
Reasoning behind this change
When I added the
{{deprecated_header}}
macro toObject.prototype.__proto__
, I had to wrap all the indicator headers in a<div>
to prevent the empty<p>
from being inserted between them, and I also had to add theoverheadIndicator
class to the firstwarning
so that it would get snugged up to the deprecation header.I also had similar problems with some indicators not getting snugged up in the past, and I found it annoying.
TODO: