Fossil SCM

Several padding tweaks to ensure proper line/code alignment in all of the skins.

stephan 2020-08-16 05:10 line-number-selection
Commit e0e5449aa43f7da7b960e1926091c82dc3c9e532133ff71683ef99edb1aace8a
--- skins/ardoise/css.txt
+++ skins/ardoise/css.txt
@@ -572,10 +572,13 @@
572572
white-space: nowrap;
573573
background: #000;
574574
border: 2px solid #bbb;
575575
border-radius: 5px
576576
}
577
+table.numbered-lines td.file-content > pre {
578
+ margin-top: -2px/*offset CODE tag border*/;
579
+}
577580
pre > code {
578581
padding: 1rem 1.5rem;
579582
white-space: pre
580583
}
581584
td,
582585
--- skins/ardoise/css.txt
+++ skins/ardoise/css.txt
@@ -572,10 +572,13 @@
572 white-space: nowrap;
573 background: #000;
574 border: 2px solid #bbb;
575 border-radius: 5px
576 }
 
 
 
577 pre > code {
578 padding: 1rem 1.5rem;
579 white-space: pre
580 }
581 td,
582
--- skins/ardoise/css.txt
+++ skins/ardoise/css.txt
@@ -572,10 +572,13 @@
572 white-space: nowrap;
573 background: #000;
574 border: 2px solid #bbb;
575 border-radius: 5px
576 }
577 table.numbered-lines td.file-content > pre {
578 margin-top: -2px/*offset CODE tag border*/;
579 }
580 pre > code {
581 padding: 1rem 1.5rem;
582 white-space: pre
583 }
584 td,
585
+18 -5
--- src/default.css
+++ src/default.css
@@ -1177,14 +1177,18 @@
11771177
font-size: inherit;
11781178
line-height: inherit;
11791179
white-space: inherit;
11801180
margin: 0;
11811181
vertical-align: top;
1182
- padding: 1em 0 0 0 /*prevents slight overlap at top */;
1182
+ padding: 0.25em 0 0 0 /*prevents slight overlap at top */;
11831183
}
11841184
table.numbered-lines td.line-numbers {
11851185
width: 4.5em;
1186
+}
1187
+table.numbered-lines td.line-numbers > span:first-of-type {
1188
+ margin-top: 0.25em/*must match top PADDING of
1189
+ td.file-content > pre > code*/;
11861190
}
11871191
table.numbered-lines td.line-numbers > span {
11881192
display: block;
11891193
margin: 0;
11901194
padding: 0;
@@ -1198,24 +1202,33 @@
11981202
}
11991203
table.numbered-lines td.line-numbers > span:hover {
12001204
background-color: rgba(112, 112, 112, 0.25);
12011205
}
12021206
table.numbered-lines td.file-content {
1203
- padding-left: 1em;
1207
+ padding-left: 0.25em;
12041208
}
12051209
table.numbered-lines td.file-content > pre,
12061210
table.numbered-lines td.file-content > pre > code {
1207
- padding: 0;
12081211
margin: 0;
1212
+ padding: 0;
12091213
line-height: inherit;
12101214
font-size: inherit;
12111215
font-family: inherit;
12121216
white-space: pre;
1217
+ display: block/*necessary for certain skins!*/;
12131218
}
12141219
table.numbered-lines td.file-content > pre {
1220
+}
1221
+table.numbered-lines td.file-content > pre > code {
12151222
overflow: auto;
1216
- padding: 0 0 1em 0 /*prevents a slight underlap at bottom from triggering a scrollar */;
1223
+ padding-left: 0.5em;
1224
+ padding-right: 0.5em;
1225
+ padding-top: 0.25em/*any top padding here must match the top MARGIN of
1226
+ td.line-numbers's first span child or the
1227
+ lines/code will get misaligned. */;
1228
+ padding-bottom: 0.25em/*prevents a slight overlap at bottom from
1229
+ triggering a scroller*/;
12171230
}
12181231
table.numbered-lines td.file-content > pre > code > * {
12191232
/* Defense against syntax highlighters indirectly messing up these
12201233
properties... */
12211234
line-height: inherit;
@@ -1269,7 +1282,7 @@
12691282
border-color: rgb( 127, 127, 127, 0.5 );
12701283
}
12711284
12721285
blockquote.file-content {
12731286
/* file content block in the /file page */
1274
- margin: 1em 2em;
1287
+ margin: 0 1em;
12751288
}
12761289
--- src/default.css
+++ src/default.css
@@ -1177,14 +1177,18 @@
1177 font-size: inherit;
1178 line-height: inherit;
1179 white-space: inherit;
1180 margin: 0;
1181 vertical-align: top;
1182 padding: 1em 0 0 0 /*prevents slight overlap at top */;
1183 }
1184 table.numbered-lines td.line-numbers {
1185 width: 4.5em;
 
 
 
 
1186 }
1187 table.numbered-lines td.line-numbers > span {
1188 display: block;
1189 margin: 0;
1190 padding: 0;
@@ -1198,24 +1202,33 @@
1198 }
1199 table.numbered-lines td.line-numbers > span:hover {
1200 background-color: rgba(112, 112, 112, 0.25);
1201 }
1202 table.numbered-lines td.file-content {
1203 padding-left: 1em;
1204 }
1205 table.numbered-lines td.file-content > pre,
1206 table.numbered-lines td.file-content > pre > code {
1207 padding: 0;
1208 margin: 0;
 
1209 line-height: inherit;
1210 font-size: inherit;
1211 font-family: inherit;
1212 white-space: pre;
 
1213 }
1214 table.numbered-lines td.file-content > pre {
 
 
1215 overflow: auto;
1216 padding: 0 0 1em 0 /*prevents a slight underlap at bottom from triggering a scrollar */;
 
 
 
 
 
 
1217 }
1218 table.numbered-lines td.file-content > pre > code > * {
1219 /* Defense against syntax highlighters indirectly messing up these
1220 properties... */
1221 line-height: inherit;
@@ -1269,7 +1282,7 @@
1269 border-color: rgb( 127, 127, 127, 0.5 );
1270 }
1271
1272 blockquote.file-content {
1273 /* file content block in the /file page */
1274 margin: 1em 2em;
1275 }
1276
--- src/default.css
+++ src/default.css
@@ -1177,14 +1177,18 @@
1177 font-size: inherit;
1178 line-height: inherit;
1179 white-space: inherit;
1180 margin: 0;
1181 vertical-align: top;
1182 padding: 0.25em 0 0 0 /*prevents slight overlap at top */;
1183 }
1184 table.numbered-lines td.line-numbers {
1185 width: 4.5em;
1186 }
1187 table.numbered-lines td.line-numbers > span:first-of-type {
1188 margin-top: 0.25em/*must match top PADDING of
1189 td.file-content > pre > code*/;
1190 }
1191 table.numbered-lines td.line-numbers > span {
1192 display: block;
1193 margin: 0;
1194 padding: 0;
@@ -1198,24 +1202,33 @@
1202 }
1203 table.numbered-lines td.line-numbers > span:hover {
1204 background-color: rgba(112, 112, 112, 0.25);
1205 }
1206 table.numbered-lines td.file-content {
1207 padding-left: 0.25em;
1208 }
1209 table.numbered-lines td.file-content > pre,
1210 table.numbered-lines td.file-content > pre > code {
 
1211 margin: 0;
1212 padding: 0;
1213 line-height: inherit;
1214 font-size: inherit;
1215 font-family: inherit;
1216 white-space: pre;
1217 display: block/*necessary for certain skins!*/;
1218 }
1219 table.numbered-lines td.file-content > pre {
1220 }
1221 table.numbered-lines td.file-content > pre > code {
1222 overflow: auto;
1223 padding-left: 0.5em;
1224 padding-right: 0.5em;
1225 padding-top: 0.25em/*any top padding here must match the top MARGIN of
1226 td.line-numbers's first span child or the
1227 lines/code will get misaligned. */;
1228 padding-bottom: 0.25em/*prevents a slight overlap at bottom from
1229 triggering a scroller*/;
1230 }
1231 table.numbered-lines td.file-content > pre > code > * {
1232 /* Defense against syntax highlighters indirectly messing up these
1233 properties... */
1234 line-height: inherit;
@@ -1269,7 +1282,7 @@
1282 border-color: rgb( 127, 127, 127, 0.5 );
1283 }
1284
1285 blockquote.file-content {
1286 /* file content block in the /file page */
1287 margin: 0 1em;
1288 }
1289

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button