chore(typography): Optimize selectors

This commit is contained in:
Lucas Larroche 2022-03-06 12:11:41 +07:00
parent e49e6426a0
commit cf7c1e340c
17 changed files with 51 additions and 108 deletions

View file

@ -629,21 +629,6 @@ sup {
top: -0.5em;
}
dl dl,
dl ol,
dl ul,
ol dl,
ul dl {
margin: 0;
}
ol ol,
ol ul,
ul ol,
ul ul {
margin: 0;
}
address,
blockquote,
dl,
@ -748,8 +733,7 @@ small {
font-size: var(--font-size);
}
ul,
ol {
:where(dl, ol, ul) {
padding-right: 0;
padding-left: var(--spacing);
-webkit-padding-start: var(--spacing);
@ -757,11 +741,15 @@ ol {
-webkit-padding-end: 0;
padding-inline-end: 0;
}
ul li,
ol li {
:where(dl, ol, ul) li {
margin-bottom: calc(var(--typography-spacing-vertical) * 0.25);
}
:where(dl, ol, ul) :is(dl, ol, ul) {
margin: 0;
margin-top: calc(var(--typography-spacing-vertical) * 0.25);
}
ul li {
list-style: square;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -659,21 +659,6 @@ sup {
top: -0.5em;
}
dl dl,
dl ol,
dl ul,
ol dl,
ul dl {
margin: 0;
}
ol ol,
ol ul,
ul ol,
ul ul {
margin: 0;
}
address,
blockquote,
dl,
@ -805,8 +790,7 @@ small {
font-size: var(--font-size);
}
ul,
ol {
:where(dl, ol, ul) {
padding-right: 0;
padding-left: var(--spacing);
-webkit-padding-start: var(--spacing);
@ -814,11 +798,15 @@ ol {
-webkit-padding-end: 0;
padding-inline-end: 0;
}
ul li,
ol li {
:where(dl, ol, ul) li {
margin-bottom: calc(var(--typography-spacing-vertical) * 0.25);
}
:where(dl, ol, ul) :is(dl, ol, ul) {
margin: 0;
margin-top: calc(var(--typography-spacing-vertical) * 0.25);
}
ul li {
list-style: square;
}

File diff suppressed because one or more lines are too long

View file

@ -599,21 +599,6 @@ sup {
top: -0.5em;
}
dl dl,
dl ol,
dl ul,
ol dl,
ul dl {
margin: 0;
}
ol ol,
ol ul,
ul ol,
ul ul {
margin: 0;
}
address,
blockquote,
dl,
@ -718,8 +703,7 @@ small {
font-size: var(--font-size);
}
ul,
ol {
:where(dl, ol, ul) {
padding-right: 0;
padding-left: var(--spacing);
-webkit-padding-start: var(--spacing);
@ -727,11 +711,15 @@ ol {
-webkit-padding-end: 0;
padding-inline-end: 0;
}
ul li,
ol li {
:where(dl, ol, ul) li {
margin-bottom: calc(var(--typography-spacing-vertical) * 0.25);
}
:where(dl, ol, ul) :is(dl, ol, ul) {
margin: 0;
margin-top: calc(var(--typography-spacing-vertical) * 0.25);
}
ul li {
list-style: square;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
css/pico.min.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -591,21 +591,6 @@ sup {
top: -0.5em;
}
dl dl,
dl ol,
dl ul,
ol dl,
ul dl {
margin: 0;
}
ol ol,
ol ul,
ul ol,
ul ul {
margin: 0;
}
address,
blockquote,
dl,
@ -734,8 +719,7 @@ small {
font-size: var(--font-size);
}
ul,
ol {
:where(dl, ol, ul) {
padding-right: 0;
padding-left: var(--spacing);
-webkit-padding-start: var(--spacing);
@ -743,11 +727,15 @@ ol {
-webkit-padding-end: 0;
padding-inline-end: 0;
}
ul li,
ol li {
:where(dl, ol, ul) li {
margin-bottom: calc(var(--typography-spacing-vertical) * 0.25);
}
:where(dl, ol, ul) :is(dl, ol, ul) {
margin: 0;
margin-top: calc(var(--typography-spacing-vertical) * 0.25);
}
ul li {
list-style: square;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -28,23 +28,6 @@ sup {
top: -0.5em;
}
// Remove the margin on nested lists in Chrome, Edge, IE, and Safari
dl dl,
dl ol,
dl ul,
ol dl,
ul dl {
margin: 0;
}
// Remove the margin on nested lists in Edge 18- and IE
ol ol,
ol ul,
ul ol,
ul ul {
margin: 0;
}
// Pico
//
@ -156,7 +139,7 @@ h6 {
// Margin-top for headings after a typography block
:where(address, blockquote, dl, figure, form, ol, p, pre, table, ul) {
& ~ :is(h1, h2, h3, h4, h5, h6) {
~ :is(h1, h2, h3, h4, h5, h6) {
margin-top: var(--typography-spacing-vertical);
}
}
@ -208,8 +191,7 @@ small {
}
// Lists
ul,
ol {
:where(dl, ol, ul) {
padding-right: 0;
padding-left: var(--spacing);
padding-inline-start: var(--spacing);
@ -220,6 +202,15 @@ ol {
}
}
// Margin-top for nested lists
// 1. Remove the margin on nested lists in Chrome, Edge, IE, and Safari
:where(dl, ol, ul) {
:is(dl, ol, ul) {
margin: 0; // 1
margin-top: calc(var(--typography-spacing-vertical) * 0.25);
}
}
ul li {
list-style: square;
}