-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
report: tweak summary marker styles #12267
Conversation
} | ||
|
||
/* Older webkit browsers might have -webkit-details-marker, | ||
and require setting list style type to none. */ | ||
.lh-audit-group > summary, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would have used supports not selector(...)
but safari doesn't support that.
@@ -541,8 +541,19 @@ | |||
background-color: var(--color-hover); | |||
} | |||
|
|||
/* Hide the expandable arrow icon, three ways: via the CSS Counter Styles spec, for webkit/blink browsers, hiding the polyfilled icon */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link is dead, i found the old sass code but it didn't seem helpful to have here
comment confused me so I just removed. maybe someone could help me reword? we aren't use @counter-styles (whatever that is), and I'm don't know what "polyfilled icon" is referring to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
counter styles spec was .... incorrect.
"polyfilled icon" means the CSS added by deatils-element-polyfill (which is used in PSI for... old edge users and IE11 users?)
we can remove that polyfill now, tbh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx for looking into this. i think we can simplify it even more.
and yeah thanks for filing the chromium issue.. agree it's impractical to not use the -webkit prefix if you care about either safari or FF.
@@ -541,8 +541,19 @@ | |||
background-color: var(--color-hover); | |||
} | |||
|
|||
/* Hide the expandable arrow icon, three ways: via the CSS Counter Styles spec, for webkit/blink browsers, hiding the polyfilled icon */ | |||
/* https://github.com/javan/details-element-polyfill/blob/master/src/details-element-polyfill/polyfill.sass */ | |||
/* We want to hide the browser's default arrow marker on summary elements. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i rewrote this to be a little simpler. (and document why we do each thing)
/* We want to hide the browser's default arrow marker on summary elements. Admittedly, it's complicated. */
.lh-audit-group > summary,
.lh-expandable-details > summary {
/* Blink 89+ and Firefox will hide the arrow when display is changed from (new) default of `list-item` to block. https://chromestatus.com/feature/6730096436051968*/
display: block;
}
/* Safari and Blink <=88 require using the -webkit-details-marker selector */
.lh-audit-group > summary::-webkit-details-marker,
.lh-expandable-details > summary::-webkit-details-marker {
display: none;
}
/* When the details-element-polyfill is used, it adds an ugly arrow. Hide it. https://github.com/javan/details-element-polyfill/blob/main/src/styles.js */
.lh-audit-group > summary:before,
.lh-expandable-details > summary:before {
display: none;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tweaked my comments a bit, but IMO it was already specifying why things were being done at an appropriate level of detail (new/old browsers, tale as old as time). The provided links provides more detail (like what version of blink the newer stuff is supported).
got rid of the @supports
block too, the idea there was to eventually have chrome not emit a deprecation warning if it was smart and checked for these rules in a better way; but the deprecation is now removed, so whatever.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unclear why this has to be contentious..
I tweaked my comments a bit, but IMO it was already specifying why things were being done at an appropriate level of detail
if that were the case, then you would have deleted the list-style-type: none;
rule. it's totally unnecessary.
@@ -541,8 +541,19 @@ | |||
background-color: var(--color-hover); | |||
} | |||
|
|||
/* Hide the expandable arrow icon, three ways: via the CSS Counter Styles spec, for webkit/blink browsers, hiding the polyfilled icon */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
counter styles spec was .... incorrect.
"polyfilled icon" means the CSS added by deatils-element-polyfill (which is used in PSI for... old edge users and IE11 users?)
we can remove that polyfill now, tbh.
related: #12089
Latest Chrome decides to emit a deprecation warning for
::-webkit-details-marker
(it probably shouldn't...). this doesn't actually avoid that, but I thought we should use the new::marker
just cuz.still works in FF/Safari/Chrome. actually, nothing really changes :) this will be eventually necessary, I guess Chrome will remove old support one day?