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 {
|
||||
--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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue