Fossil SCM

Some CSS consolidation and got the horizontal scrollbars working on unusually wide code files.

stephan 2020-08-15 09:58 line-number-selection
Commit 3d49b73f409b4bd8f51f8c35745b5f705b2852d30ce2d869d35e91dc22215d06
1 file changed +37 -25
+37 -25
--- src/default.css
+++ src/default.css
@@ -1153,19 +1153,33 @@
11531153
font-weight: initial;
11541154
margin: 0 0.25em 0 0.25em;
11551155
vertical-align: middle;
11561156
}
11571157
1158
-table.numbered-lines > tbody > tr > td {
1158
+table.numbered-lines {
1159
+ width: 100%;
1160
+ table-layout: fixed /* required to keep ultra-wide code from exceeding
1161
+ window width, and instead force a scrollbar
1162
+ on them. */;
1163
+}
1164
+table.numbered-lines > tbody > tr {
11591165
font-family: monospace;
1160
- font-size: inherit;
1166
+ font-size: 1.2em;
11611167
line-height: 1.35;
11621168
white-space: pre;
1169
+}
1170
+table.numbered-lines > tbody > tr > td {
1171
+ font-family: inherit;
1172
+ font-size: inherit;
1173
+ line-height: inherit;
1174
+ white-space: inherit;
11631175
margin: 0;
1164
- white-space: nowrap;
11651176
vertical-align: top;
11661177
padding: 1em 0 0 0 /*prevents slight overlap at top */;
1178
+}
1179
+table.numbered-lines td.line-numbers {
1180
+ width: 6em;
11671181
}
11681182
table.numbered-lines td.line-numbers > span {
11691183
display: block;
11701184
margin: 0;
11711185
padding: 0;
@@ -1173,39 +1187,37 @@
11731187
font-size: inherit;
11741188
font-family: inherit;
11751189
cursor: pointer;
11761190
white-space: pre;
11771191
margin-right: 2px/*keep selection from nudging the right column */;
1192
+ text-align: right;
11781193
}
11791194
table.numbered-lines td.line-numbers > span:hover {
11801195
background-color: rgba(112, 112, 112, 0.25);
11811196
}
11821197
table.numbered-lines td.file-content {
11831198
padding-left: 1em;
11841199
}
1185
-table.numbered-lines td.file-content > pre {
1186
- margin: 0;
1187
- padding: 0;
1188
- overflow-x: auto;
1189
- overflow-y: hidden /* apparently not needed, but eases my mind */;
1190
- padding: 0 0 1em 0 /*prevents a slight underlap at bottom from triggering a scrollar */;
1191
- line-height: inherit;
1192
- font-size: inherit;
1193
- font-family: inherit;
1194
-}
1195
-table.numbered-lines td.file-content > pre > code {
1196
- margin: 0;
1197
- padding: 0;
1198
- white-space: pre;
1199
- line-height: inherit;
1200
- font-size: inherit;
1201
- font-family: inherit;
1202
-}
1203
-table.numbered-lines td.file-content > pre > code > * {
1204
- box-sizing: border-box;
1205
- font-size: inherit;
1206
- line-height: inherit;
1200
+table.numbered-lines td.file-content > pre,
1201
+table.numbered-lines td.file-content > pre > code {
1202
+ padding: 0;
1203
+ margin: 0;
1204
+ line-height: inherit;
1205
+ font-size: inherit;
1206
+ font-family: inherit;
1207
+ white-space: pre;
1208
+}
1209
+table.numbered-lines td.file-content > pre {
1210
+ overflow: auto;
1211
+ padding: 0 0 1em 0 /*prevents a slight underlap at bottom from triggering a scrollar */;
1212
+}
1213
+table.numbered-lines td.file-content > pre > code > * {
1214
+ /* Defense against syntax highlighters indirectly messing up these
1215
+ properties... */
1216
+ line-height: inherit;
1217
+ font-size: inherit;
1218
+ font-family: inherit;
12071219
}
12081220
div.selectedText/*legacy*/,
12091221
table.numbered-lines td.line-numbers span.selected-line/*replacement*/ {
12101222
font-weight: bold;
12111223
color: blue;
12121224
--- src/default.css
+++ src/default.css
@@ -1153,19 +1153,33 @@
1153 font-weight: initial;
1154 margin: 0 0.25em 0 0.25em;
1155 vertical-align: middle;
1156 }
1157
1158 table.numbered-lines > tbody > tr > td {
 
 
 
 
 
 
1159 font-family: monospace;
1160 font-size: inherit;
1161 line-height: 1.35;
1162 white-space: pre;
 
 
 
 
 
 
1163 margin: 0;
1164 white-space: nowrap;
1165 vertical-align: top;
1166 padding: 1em 0 0 0 /*prevents slight overlap at top */;
 
 
 
1167 }
1168 table.numbered-lines td.line-numbers > span {
1169 display: block;
1170 margin: 0;
1171 padding: 0;
@@ -1173,39 +1187,37 @@
1173 font-size: inherit;
1174 font-family: inherit;
1175 cursor: pointer;
1176 white-space: pre;
1177 margin-right: 2px/*keep selection from nudging the right column */;
 
1178 }
1179 table.numbered-lines td.line-numbers > span:hover {
1180 background-color: rgba(112, 112, 112, 0.25);
1181 }
1182 table.numbered-lines td.file-content {
1183 padding-left: 1em;
1184 }
1185 table.numbered-lines td.file-content > pre {
1186 margin: 0;
1187 padding: 0;
1188 overflow-x: auto;
1189 overflow-y: hidden /* apparently not needed, but eases my mind */;
1190 padding: 0 0 1em 0 /*prevents a slight underlap at bottom from triggering a scrollar */;
1191 line-height: inherit;
1192 font-size: inherit;
1193 font-family: inherit;
1194 }
1195 table.numbered-lines td.file-content > pre > code {
1196 margin: 0;
1197 padding: 0;
1198 white-space: pre;
1199 line-height: inherit;
1200 font-size: inherit;
1201 font-family: inherit;
1202 }
1203 table.numbered-lines td.file-content > pre > code > * {
1204 box-sizing: border-box;
1205 font-size: inherit;
1206 line-height: inherit;
1207 }
1208 div.selectedText/*legacy*/,
1209 table.numbered-lines td.line-numbers span.selected-line/*replacement*/ {
1210 font-weight: bold;
1211 color: blue;
1212
--- src/default.css
+++ src/default.css
@@ -1153,19 +1153,33 @@
1153 font-weight: initial;
1154 margin: 0 0.25em 0 0.25em;
1155 vertical-align: middle;
1156 }
1157
1158 table.numbered-lines {
1159 width: 100%;
1160 table-layout: fixed /* required to keep ultra-wide code from exceeding
1161 window width, and instead force a scrollbar
1162 on them. */;
1163 }
1164 table.numbered-lines > tbody > tr {
1165 font-family: monospace;
1166 font-size: 1.2em;
1167 line-height: 1.35;
1168 white-space: pre;
1169 }
1170 table.numbered-lines > tbody > tr > td {
1171 font-family: inherit;
1172 font-size: inherit;
1173 line-height: inherit;
1174 white-space: inherit;
1175 margin: 0;
 
1176 vertical-align: top;
1177 padding: 1em 0 0 0 /*prevents slight overlap at top */;
1178 }
1179 table.numbered-lines td.line-numbers {
1180 width: 6em;
1181 }
1182 table.numbered-lines td.line-numbers > span {
1183 display: block;
1184 margin: 0;
1185 padding: 0;
@@ -1173,39 +1187,37 @@
1187 font-size: inherit;
1188 font-family: inherit;
1189 cursor: pointer;
1190 white-space: pre;
1191 margin-right: 2px/*keep selection from nudging the right column */;
1192 text-align: right;
1193 }
1194 table.numbered-lines td.line-numbers > span:hover {
1195 background-color: rgba(112, 112, 112, 0.25);
1196 }
1197 table.numbered-lines td.file-content {
1198 padding-left: 1em;
1199 }
1200 table.numbered-lines td.file-content > pre,
1201 table.numbered-lines td.file-content > pre > code {
1202 padding: 0;
1203 margin: 0;
1204 line-height: inherit;
1205 font-size: inherit;
1206 font-family: inherit;
1207 white-space: pre;
1208 }
1209 table.numbered-lines td.file-content > pre {
1210 overflow: auto;
1211 padding: 0 0 1em 0 /*prevents a slight underlap at bottom from triggering a scrollar */;
1212 }
1213 table.numbered-lines td.file-content > pre > code > * {
1214 /* Defense against syntax highlighters indirectly messing up these
1215 properties... */
1216 line-height: inherit;
1217 font-size: inherit;
1218 font-family: inherit;
 
 
 
1219 }
1220 div.selectedText/*legacy*/,
1221 table.numbered-lines td.line-numbers span.selected-line/*replacement*/ {
1222 font-weight: bold;
1223 color: blue;
1224

Keyboard Shortcuts

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