mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
nimdoc: CSS: tighter on mobile; fix h1 print page break (#25607)
- Small optimizations for mobile, makes code render slightly tighter. - `font-stretch: semi-condensed;` for pre works if the user's font provides such a face, shouldn’t change the rendering with the default. - Removes an excessive page break after the page header when printing. Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
This commit is contained in:
@@ -259,6 +259,8 @@ body {
|
||||
body {
|
||||
font-size: 1em;
|
||||
line-height: 1.35;
|
||||
margin-left: 0.35em;
|
||||
margin-right: 0.35em;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,6 +419,10 @@ img {
|
||||
|
||||
h1.title {
|
||||
page-break-before: avoid; }
|
||||
|
||||
.nine.columns h1:first-of-type {
|
||||
page-break-before: avoid;
|
||||
}
|
||||
|
||||
p, h2, h3 {
|
||||
orphans: 3;
|
||||
@@ -484,6 +490,22 @@ h5 {
|
||||
h6 {
|
||||
font-size: 1.1em; }
|
||||
|
||||
@media screen and (max-width: 860px) {
|
||||
h1.title {
|
||||
font-size: 2em;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 0.75em;
|
||||
}
|
||||
h2 {
|
||||
margin-top: 1.3em;
|
||||
}
|
||||
h3 {
|
||||
margin-top: 1.2em;
|
||||
}
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
padding: 0;
|
||||
@@ -667,6 +689,15 @@ pre {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 860px) {
|
||||
pre {
|
||||
font-stretch: semi-condensed;
|
||||
letter-spacing: -0.25px;
|
||||
line-height: 1.25;
|
||||
padding: 0.33em;
|
||||
}
|
||||
}
|
||||
|
||||
.copyToClipBoardBtn {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
|
||||
@@ -259,6 +259,8 @@ body {
|
||||
body {
|
||||
font-size: 1em;
|
||||
line-height: 1.35;
|
||||
margin-left: 0.35em;
|
||||
margin-right: 0.35em;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,6 +419,10 @@ img {
|
||||
|
||||
h1.title {
|
||||
page-break-before: avoid; }
|
||||
|
||||
.nine.columns h1:first-of-type {
|
||||
page-break-before: avoid;
|
||||
}
|
||||
|
||||
p, h2, h3 {
|
||||
orphans: 3;
|
||||
@@ -484,6 +490,22 @@ h5 {
|
||||
h6 {
|
||||
font-size: 1.1em; }
|
||||
|
||||
@media screen and (max-width: 860px) {
|
||||
h1.title {
|
||||
font-size: 2em;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 0.75em;
|
||||
}
|
||||
h2 {
|
||||
margin-top: 1.3em;
|
||||
}
|
||||
h3 {
|
||||
margin-top: 1.2em;
|
||||
}
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
padding: 0;
|
||||
@@ -667,6 +689,15 @@ pre {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 860px) {
|
||||
pre {
|
||||
font-stretch: semi-condensed;
|
||||
letter-spacing: -0.25px;
|
||||
line-height: 1.25;
|
||||
padding: 0.33em;
|
||||
}
|
||||
}
|
||||
|
||||
.copyToClipBoardBtn {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
|
||||
Reference in New Issue
Block a user