From 99c92222949be7da2f2a162942137644b974fb10 Mon Sep 17 00:00:00 2001 From: Leonardo Matos Date: Thu, 24 Feb 2022 00:04:56 -0300 Subject: [PATCH] Simpler/smaller typografy selectors with :where :is --- scss/content/_typography.scss | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/scss/content/_typography.scss b/scss/content/_typography.scss index 9fc5883b..7ae26b73 100644 --- a/scss/content/_typography.scss +++ b/scss/content/_typography.scss @@ -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); } }