Closed
Description
This is the offending code I've tracked down:
minimal-mistakes/_sass/minimal-mistakes/_forms.scss
Lines 391 to 393 in c501842
I tried to override non-button <a>
element styles like this:
.page__content a:not(.btn) {}
However, the use of Sass @extend
in the theme code causes Sass to generate the following CSS:
.page__content a:not(.btn):not(#goog-wm-sb) {}
/* Oh yeah... */
The problem here is, the generated :not(#goog-wm-sb)
makes the specificity of the selector higher than expected, as it has one ID selector. This makes overriding any styles difficult without !important
because a "superceding" selector also needs an ID selector now.
Can we somehow rearrange this rule so it doesn't use .btn
as aggressively? Using %btn
is one (good) way I can think of, as we don't have too many bare .btn
s to deal with.
Activity
Work around strange selector specificity
Auto deploy from GitHub Actions build 519
mmistakes commentedon Mar 2, 2021
#goog-wm-sb
styles should be removed. As they were part of Google's search field that was used on the 404 sample page... which was deprecated.mmistakes commentedon Mar 2, 2021
In fact all of these styles can probably go as G killed off the feature. No sense in shipping unused CSS.
minimal-mistakes/_sass/minimal-mistakes/_forms.scss
Lines 361 to 393 in c501842
Remove G-stuff CSS (mmistakes#2852)
Remove G-stuff CSS (#2852) (#2855)
iBug commentedon Mar 10, 2021
@mmistakes Mind adding me as a collaborator so I can help sort out issues and PRs? I check GitHub multiple times every day and can respond quickly.
Remove G-stuff CSS (mmistakes#2852) (mmistakes#2855)
Remove G-stuff CSS (mmistakes#2852) (mmistakes#2855)
Remove G-stuff CSS (mmistakes#2852) (mmistakes#2855)
Update from master after a long time (#7)