Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS newline linter #1053

Merged
merged 5 commits into from
Jul 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/linters/.stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"ignoreProperties": ["prince-pdf-display-doc-title","prince-pdf-tag-type"]
}
],
"selector-list-comma-newline-after": null,
"selector-list-comma-newline-after": "always",
"selector-pseudo-element-no-unknown": [
true,
{
Expand Down
55 changes: 41 additions & 14 deletions src/static/css/2019.css
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,13 @@ body {
box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6, .subtitle {
h1,
h2,
h3,
h4,
h5,
h6,
.subtitle {
font-family: 'Poppins', sans-serif;
line-height: 1.2em;
}
Expand All @@ -364,7 +370,8 @@ b {
font-weight: bold;
}

a:focus, a:hover {
a:focus,
a:hover {
text-decoration: underline;
}

Expand Down Expand Up @@ -528,8 +535,10 @@ h2.header {
letter-spacing: 2px;
}

header.alt-bg a:hover, footer.alt-bg a:hover,
header.alt-bg a:focus, footer.alt-bg a:focus {
header.alt-bg a:hover,
footer.alt-bg a:hover,
header.alt-bg a:focus,
footer.alt-bg a:focus {
color: #f7f779;
}

Expand All @@ -552,30 +561,35 @@ header.alt-bg a:focus, footer.alt-bg a:focus {
color: #1a2b49;
}

.top-header, footer {
.top-header,
footer {
padding-top: 40px;
padding-bottom: 40px;
}

.top-header, footer .nav {
.top-header,
footer .nav {
display: flex;
justify-content: space-between;
align-items: center;
}

header nav ul, footer nav ul {
header nav ul,
footer nav ul {
display: flex;
align-items: center;
margin: 0;
padding-inline-start: 0;
}

header nav li, footer nav li {
header nav li,
footer nav li {
display: flex;
line-height: 1.4em;
}

header nav .menu li .year-switcher, header nav .menu li .language-switcher {
header nav .menu li .year-switcher,
header nav .menu li .language-switcher {
margin-bottom: 4em;
}

Expand Down Expand Up @@ -696,7 +710,9 @@ header .cta {
color: #0b1423;
}

h2, h3, h4 {
h2,
h3,
h4 {
margin-top: 2em;
}

Expand All @@ -706,7 +722,11 @@ h4 code {
font-size: inherit;
}

p, td, th, code, li {
p,
td,
th,
code,
li {
font-size: 17px;
font-size: 1.0625rem;
line-height: 1.5em;
Expand Down Expand Up @@ -842,7 +862,8 @@ p.copyright a {

@media (max-width: 900px) and (min-width: 601px) {
/* Header */
.top-header, footer {
.top-header,
footer {
position: relative;
padding-top: 30px;
padding-bottom: 30px;
Expand Down Expand Up @@ -960,7 +981,12 @@ p.copyright a {

/* Mobile View */
@media (max-width: 600px) {
body, p, td, th, code, li {
body,
p,
td,
th,
code,
li {
font-size: 16px;
font-size: 1rem;
}
Expand All @@ -976,7 +1002,8 @@ p.copyright a {
}

/* Header */
.top-header, footer {
.top-header,
footer {
position: relative;
padding-top: 30px;
padding-bottom: 30px;
Expand Down
23 changes: 17 additions & 6 deletions src/static/css/ebook.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
margin: 0;
}

th, td {
th,
td {
padding: 5px;
}

Expand All @@ -88,7 +89,8 @@ tbody tr:nth-child(even) {
text-decoration: none;
}

.content a, .content a:visited {
.content a,
.content a:visited {
color: #0b1423;
}

Expand Down Expand Up @@ -264,7 +266,8 @@ section.chapter {
}
}

#toc, #foreword {
#toc,
#foreword {
page: front-matter;
}

Expand Down Expand Up @@ -309,7 +312,9 @@ section.chapter {
/* We have some big tables that can't be force to break
* So we cheat and make them small enough to fit on a page
*/
figure table td, figure table td li, figure table td p {
figure table td,
figure table td li,
figure table td p {
font-size: 12px;
font-size: 0.85rem;
}
Expand Down Expand Up @@ -379,13 +384,19 @@ section.chapter {
page-break-inside: avoid;
}

h1, h2, h3, h4, h5 {
h1,
h2,
h3,
h4,
h5 {
font-weight: bold;
page-break-after: avoid;
page-break-inside: avoid;
}

h1 + p, h2 + p, h3 + p {
h1 + p,
h2 + p,
h3 + p {
page-break-before: avoid;
}

Expand Down
20 changes: 13 additions & 7 deletions src/static/css/page.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@
min-width: 20rem;
}

.content > section, .content > article {
.content > section,
.content > article {
margin-bottom: 32px;
margin-bottom: 2rem;
}
Expand Down Expand Up @@ -189,7 +190,8 @@
font-style: italic;
}

.byline.reviewers, .byline.translators {
.byline.reviewers,
.byline.translators {
font-weight: normal;
}

Expand Down Expand Up @@ -219,7 +221,8 @@
padding: 1rem 0;
}

.authors,.authors h2 {
.authors,
.authors h2 {
border-bottom: 1px solid #1a2b490a;
font-size: 17px;
font-size: 1.0625rem;
Expand Down Expand Up @@ -343,7 +346,8 @@
right: -1.5rem;
}

aside, .note {
aside,
.note {
font-style: italic;
}

Expand Down Expand Up @@ -455,12 +459,14 @@ thead {
border-bottom: 1px solid #eee;
}

th, td {
th,
td {
padding: 10px;
padding: 0.625rem;
}

th.numeric, td.numeric {
th.numeric,
td.numeric {
text-align: right;
}

Expand Down Expand Up @@ -643,7 +649,7 @@ figure .fig-desktop {
left: -1rem;
}

.code-block, pre {
.code-block pre {
overflow-y: hidden;
overflow-x: auto;
margin: 8px 0;
Expand Down
17 changes: 15 additions & 2 deletions src/static/css/print.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
.top-header, .index, .discuss, #chapter-navigation, footer .navigation-logo, footer .nav-items, footer .language-switcher, footer .social-media, footer hr {
.top-header,
.index,
.discuss,
#chapter-navigation,
footer .navigation-logo,
footer .nav-items,
footer .language-switcher,
footer .social-media,
footer hr {
display: none;
}

Expand All @@ -10,7 +18,12 @@ a.btn {
display: none;
}

h1, h2, h3, p, p.copyright, p.copyright a {
h1,
h2,
h3,
p,
p.copyright,
p.copyright a {
color: black;
}

Expand Down