mirror of
https://github.com/picocss/pico.git
synced 2025-04-24 02:16:15 -04:00
Simpler/smaller typografy selectors with :where :is
This commit is contained in:
parent
7fa4a59073
commit
99c9222294
1 changed files with 4 additions and 22 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue