mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Override mandoc styling without modifying the stylesheet
This commit is contained in:
@@ -10,10 +10,7 @@
|
|||||||
|
|
||||||
/* Global defaults. */
|
/* Global defaults. */
|
||||||
|
|
||||||
/* This is handled in `rgbds.css` instead
|
html { max-width: 65em; }
|
||||||
*
|
|
||||||
* html { max-width: 65em; }
|
|
||||||
*/
|
|
||||||
body { font-family: Helvetica,Arial,sans-serif; }
|
body { font-family: Helvetica,Arial,sans-serif; }
|
||||||
table { margin-top: 0em;
|
table { margin-top: 0em;
|
||||||
margin-bottom: 0em;
|
margin-bottom: 0em;
|
||||||
|
|||||||
@@ -4,18 +4,21 @@ html {
|
|||||||
/* Reduce contrast */
|
/* Reduce contrast */
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
color: #222;
|
color: #222;
|
||||||
|
|
||||||
|
/* Override `mandoc.css`'s sowe can put it on <body> instead */
|
||||||
|
max-width: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
/* Improve readability */
|
|
||||||
font-size: 16px;
|
|
||||||
line-height: 1.4;
|
|
||||||
text-align: justify;
|
|
||||||
|
|
||||||
/* Center body horizontally (requires <html> to span full width) */
|
/* Center body horizontally (requires <html> to span full width) */
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
/* `mandoc.css`'s default, but it's applied to <html> there */
|
/* `mandoc.css`'s default, but it's applied to <html> there */
|
||||||
max-width: 65em;
|
max-width: 65em;
|
||||||
|
|
||||||
|
/* Improve readability */
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.4;
|
||||||
|
text-align: justify;
|
||||||
}
|
}
|
||||||
@media print {
|
@media print {
|
||||||
body {
|
body {
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
#!/usr/bin/awk -f
|
#!/usr/bin/awk -f
|
||||||
|
|
||||||
/<link/ {
|
|
||||||
# Inject our own style overrides
|
|
||||||
print(" <link rel=\"stylesheet\" href=\"rgbds.css\" type=\"text/css\" media=\"all\"/>")
|
|
||||||
}
|
|
||||||
|
|
||||||
/^\s+<td><b class="Sy">.+<\/b><\/td>$/ {
|
/^\s+<td><b class="Sy">.+<\/b><\/td>$/ {
|
||||||
# Assuming that all cells whose contents are bold are heading cells,
|
# Assuming that all cells whose contents are bold are heading cells,
|
||||||
# use the HTML tag for those
|
# use the HTML tag for those
|
||||||
@@ -83,3 +78,8 @@ BEGIN {
|
|||||||
# Add viewport size <meta> tag for mobile users
|
# Add viewport size <meta> tag for mobile users
|
||||||
print " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">"
|
print " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/<link/ {
|
||||||
|
# Inject our own style overrides
|
||||||
|
print(" <link rel=\"stylesheet\" href=\"rgbds.css\" type=\"text/css\" media=\"all\"/>")
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user