Simpler/smaller typografy selectors with :where :is

This commit is contained in:
Leonardo Matos 2022-02-24 00:04:56 -03:00 committed by GitHub
parent 7fa4a59073
commit 99c9222294
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,9 +97,7 @@ a {
&.secondary {
--color: var(--secondary);
&:hover,
&:active,
&:focus {
&:is(:hover, :active, :focus) {
--color: var(--secondary-hover);
}
@ -112,9 +110,7 @@ a {
&.contrast {
--color: var(--contrast);
&:hover,
&:active,
&:focus {
&:is(:hover, :active, :focus) {
--color: var(--contrast-hover);
}
@ -160,22 +156,8 @@ h6 {
}
// Margin-top for headings after a typography block
address,
blockquote,
dl,
figure,
form,
ol,
p,
pre,
table,
ul {
& ~ h1,
& ~ h2,
& ~ h3,
& ~ h4,
& ~ h5,
& ~ h6 {
:where(address, blockquote, dl, figure, form, ol, p, pre, table, ul) {
& ~ :is(h1, h2, h3, h4, h5, h6) {
margin-top: var(--typography-spacing-vertical);
}
}