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