Clean up CSS and update default styles

Normalize formatting across CSS files and fix selector whitespace
and quote usage. Change default link color to browser blue and
enable smooth scrolling; hover underlines links. Revamp table
styles (borders, caption, zebra rows, padding, footer alignment).
Adjust proof/theorem header spacing and minor spacing/padding fixes.
This commit is contained in:
2026-03-30 10:42:25 +08:00
parent 3652459503
commit aa05d73c9c
3 changed files with 150 additions and 191 deletions
+51 -38
View File
@@ -1,90 +1,103 @@
.theorem-environment { .theorem-environment {
font-style: italic; font-style: italic;
margin-top: 1em; margin-top: 1em;
padding: 0.5em; padding: 0.5em;
background-color: whitesmoke; background-color: whitesmoke;
} }
.theorem-header { .theorem-header {
font-weight: bold; font-weight: bold;
font-style: normal; font-style: normal;
} }
.theorem-header .index:before { .theorem-header .index:before {
content: ' '; content: " ";
} }
.theorem-header .name:before { .theorem-header .name:before {
content: ' ('; content: " (";
} }
.theorem-header .name:after { .theorem-header .name:after {
content: ')'; content: ")";
} }
.theorem-header:after { .theorem-header:after {
content: '.\2002\2002'; content: ".\2002\2002";
} }
.theorem-header+p { .theorem-header + p {
display: inline; display: inline;
} }
.Proof .type { .Proof .type {
font-style: italic; font-style: italic;
font-weight: normal; font-weight: normal;
} }
.Proof { .Proof {
background: none; background: none;
font-style: normal; font-style: normal;
position: relative; position: relative;
} }
.Proof:after { .Proof:after {
content: '∎'; content: "∎";
position: absolute; position: absolute;
right: 0px; right: 0px;
bottom: 0px; bottom: 0px;
}
.Proof span.theorem-header span.name {
font-weight: normal;
font-style: italic;
}
.Proof span.theorem-header span.name:before {
content: " ";
}
.Proof span.theorem-header span.name:after {
content: " ";
} }
table.postindex { table.postindex {
width: 100%; width: 100%;
} }
table.postindex cite { table.postindex cite {
font-style: normal; font-style: normal;
} }
table.postindex td.right { table.postindex td.right {
text-align: right; text-align: right;
width: 11ex; width: 11ex;
} }
.header-section-number { .header-section-number {
margin-right: 10px; margin-right: 10px;
} }
.header-section-number:after { .header-section-number:after {
content: '.'; content: ".";
} }
.csl-entry { .csl-entry {
display: table; display: table;
width: 100%; width: 100%;
table-layout: auto; table-layout: auto;
} }
.csl-left-margin { .csl-left-margin {
display: table-cell; display: table-cell;
padding-right: 0.5em; padding-right: 0.5em;
white-space: nowrap; white-space: nowrap;
width: 1px; width: 1px;
} }
.csl-right-inline { .csl-right-inline {
display: table-cell; display: table-cell;
}
.csl-right-inline a {
word-break: break-all;
} }
.csl-right-inline a{
word-break: break-all;
}
+66 -119
View File
@@ -3,10 +3,7 @@
--color-tag1: gray; --color-tag1: gray;
--color-tag2: darkolivegreen; --color-tag2: darkolivegreen;
--color-bg: white; --color-bg: white;
--color-link: #337ab7; --color-link: #0000ee;
--color-linkhbg: #e6f0ff;
--color-linkh: #002266;
--color-bq: olivedrab;
--color-notice: #fb4f4f; --color-notice: #fb4f4f;
} }
@@ -19,11 +16,18 @@
html { html {
scrollbar-gutter: stable; scrollbar-gutter: stable;
scroll-behavior: smooth;
font-size: 14pt; font-size: 14pt;
} }
body { body {
font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; font-family:
"Lato",
-apple-system,
BlinkMacSystemFont,
"PingFang SC",
"Microsoft YaHei",
sans-serif;
font-optical-sizing: auto; font-optical-sizing: auto;
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
@@ -32,30 +36,28 @@ body {
color: var(--color-text); color: var(--color-text);
background-color: var(--color-bg); background-color: var(--color-bg);
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
} text-autospace: no-autospace; /*using pangu.hs*/
body.lang-zh {
text-align: left;
} }
body a { body a {
color: var(--color-link);
text-decoration: none; text-decoration: none;
} }
.text-space a:hover { body a:hover {
background-color: var(--color-linkhbg); text-decoration: underline;
color: var(--color-linkh);
text-decoration: none;
} }
details { details {
background-color: var(--color-linkhbg); padding-left: 1em;
border: 2px solid var(--color-text);
} }
summary:hover { summary:hover {
cursor: pointer; cursor: pointer;
} }
/*mathML*/ /*mathML*/
.htmlmathparagraph, mtext,math { .htmlmathparagraph,
mtext,
math {
font-family: Lete Sans Math; font-family: Lete Sans Math;
} }
.math-container, .math-container,
@@ -63,7 +65,7 @@ summary:hover {
display: block; display: block;
overflow-x: auto; overflow-x: auto;
overflow-y: hidden; overflow-y: hidden;
padding: .5em; padding: 0.5em;
} }
.math-container.math-container-tagged { .math-container.math-container-tagged {
@@ -72,7 +74,7 @@ summary:hover {
align-items: center; align-items: center;
column-gap: 1rem; column-gap: 1rem;
overflow: visible; overflow: visible;
padding: .5em 0; padding: 0.5em 0;
} }
.math-container.math-container-tagged .math-tag-spacer { .math-container.math-container-tagged .math-tag-spacer {
@@ -83,7 +85,7 @@ summary:hover {
min-width: 0; min-width: 0;
overflow-x: auto; overflow-x: auto;
overflow-y: hidden; overflow-y: hidden;
padding: .5em 0; padding: 0.5em 0;
} }
.math-container.math-container-tagged .math-tag { .math-container.math-container-tagged .math-tag {
@@ -104,66 +106,32 @@ summary:hover {
font-variant-caps: small-caps; font-variant-caps: small-caps;
} }
p {
hyphens: auto;
}
a.url { a.url {
word-break: break-all; word-break: break-all;
} }
html body div.text-space main ul.post-list {
list-style-type: none;
padding-left: 1em;
}
/* top bar */
header { header {
font-weight: 400; font-weight: 400;
font-family: "IosevkaC", sans-serif; font-family: "IosevkaC", sans-serif;
} }
/* top bar*/
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
}
.navright a {
margin: 0 0 0 1em;
}
/* Links inside the navbar */
.navbar a {
text-decoration: none;
color: var(--color-text);
}
.navbar a:visited {
color: var(--color-text);
}
nav {
text-align: right;
border-bottom: solid 1px var(--color-text);
}
nav a { nav a {
font-size: 1.2rem;
/*margin-left: 0.5em;*/
display: inline-block; display: inline-block;
vertical-align: middle;
text-decoration: none; text-decoration: none;
} }
.uri { .uri {
word-wrap: break-word; word-wrap: break-word;
/* Legacy support */
overflow-wrap: break-word; overflow-wrap: break-word;
/* Modern property */
word-break: break-all; word-break: break-all;
/* Break long words if necessary */
white-space: normal; white-space: normal;
/* Allow wrapping */
} }
footer { footer {
color: var(--color-text); color: var(--color-text);
font-size: 0.8rem; font-size: 0.8rem;
@@ -172,15 +140,6 @@ footer {
padding-right: 1em; padding-right: 1em;
} }
h1,
h2,
h3,
h4,
h5,
h6 {
text-align: left;
}
.pagetitle { .pagetitle {
font-size: 2rem; font-size: 2rem;
font-weight: normal; font-weight: normal;
@@ -194,22 +153,20 @@ h1 {
font-size: 1.44rem; font-size: 1.44rem;
font-weight: bold; font-weight: bold;
font-style: normal; font-style: normal;
text-align: left;
line-height: 100%;
} }
h2 { h2 {
margin-top: 1em; margin-top: 1em;
font-size: 1.2rem; font-size: 1.2rem;
font-weight: bold; font-weight: bold;
font-style: normal font-style: normal;
} }
h3 { h3 {
margin-top: 1em; margin-top: 1em;
font-size: 1rem; font-size: 1rem;
font-weight: bold; font-weight: bold;
font-style: normal font-style: normal;
} }
article .header { article .header {
@@ -219,14 +176,7 @@ article .header {
text-align: left; text-align: left;
} }
.info,
.info {
color: var(--color-tag2);
font-size: 1rem;
font-style: normal;
text-align: left;
}
.info a { .info a {
color: var(--color-tag2); color: var(--color-tag2);
font-size: 1rem; font-size: 1rem;
@@ -247,33 +197,45 @@ section.body {
line-height: normal; line-height: normal;
} }
blockquote { /* table. copied from https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/table */
margin: 1rem 0; table {
padding: 0 0 0 1.5em; border-collapse: collapse;
border-left: 3px solid var(--color-bq); border: 2px solid rgb(140 140 140);
font-size: 0.8rem;
letter-spacing: 1px;
} }
blockquote p { caption {
margin: 0; caption-side: bottom;
padding: 10px;
font-weight: bold;
} }
ol { thead,
padding-left: 2em; tfoot {
} background-color: rgb(228 240 245);
ul {
list-style-type: square;
padding-left: 2em;
}
li {
margin-bottom: 0.15em;
} }
table,
th, th,
td { td {
border: 1px solid darkolivegreen; border: 1px solid rgb(160 160 160);
border-collapse: collapse; padding: 8px 10px;
text-align: left; }
td:last-of-type {
text-align: center;
}
tbody > tr:nth-of-type(even) {
background-color: rgb(237 238 242);
}
tfoot th {
text-align: right;
}
tfoot td {
font-weight: bold;
} }
figure { figure {
@@ -284,23 +246,11 @@ figure {
max-width: 80%; max-width: 80%;
} }
figcaption {
/* font: italic smaller sans-serif; */
padding: 3px;
text-align: center;
}
.caption {
display: none
}
.centerimg img { .centerimg img {
margin: 0 auto 0 auto; margin: 0 auto 0 auto;
display: block; display: block;
} }
div.highlight, div.highlight,
pre code { pre code {
margin: auto; margin: auto;
@@ -320,18 +270,16 @@ code {
text-rendering: optimizeSpeed; text-rendering: optimizeSpeed;
} }
.draft-notice { .draft-notice {
color: var(--color-notice); color: var(--color-notice);
margin: 1em auto; margin: 1em auto;
text-align: center text-align: center;
} }
.subtitle { .subtitle {
text-align: left; text-align: left;
font-size: 1.2rem; font-size: 1.2rem;
margin-top: 0 margin-top: 0;
} }
.gallery { .gallery {
margin-top: 2em; margin-top: 2em;
@@ -401,7 +349,7 @@ code {
padding-left: 1em; padding-left: 1em;
line-height: 1.2; line-height: 1.2;
list-style-type: decimal; list-style-type: decimal;
margin-left: 0 margin-left: 0;
} }
div#contents ul.notes-list, div#contents ul.notes-list,
@@ -414,8 +362,8 @@ code {
list-style-type: none; list-style-type: none;
} }
div#contents-big li+li { div#contents-big li + li {
margin-top: 0.5em margin-top: 0.5em;
} }
div#contents-big { div#contents-big {
@@ -428,7 +376,7 @@ code {
margin-right: 4em; margin-right: 4em;
position: sticky; position: sticky;
top: 5rem; top: 5rem;
left: 100% left: 100%;
} }
div#contents-big .mini-header { div#contents-big .mini-header {
@@ -452,7 +400,6 @@ code {
} }
@media print { @media print {
.no-print, .no-print,
.no-print * { .no-print * {
display: none !important; display: none !important;
+33 -34
View File
@@ -1,52 +1,51 @@
/* fonts */ /* fonts */
@font-face { @font-face {
font-family: "Lato"; font-family: "Lato";
src: url("/fonts/Lato-Regular.woff2") format("woff2"); src: url("/fonts/Lato-Regular.woff2") format("woff2");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: "Lato"; font-family: "Lato";
src: url("/fonts/Lato-Bold.woff2") format("woff2"); src: url("/fonts/Lato-Bold.woff2") format("woff2");
font-weight: bold; font-weight: bold;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: "Lato"; font-family: "Lato";
src: url("/fonts/Lato-Italic.woff2") format("woff2"); src: url("/fonts/Lato-Italic.woff2") format("woff2");
font-weight: normal; font-weight: normal;
font-style: italic; font-style: italic;
} }
@font-face { @font-face {
font-family: "Lato"; font-family: "Lato";
src: url("/fonts/Lato-BoldItalic.woff2") format("woff2"); src: url("/fonts/Lato-BoldItalic.woff2") format("woff2");
font-weight: bold; font-weight: bold;
font-style: italic; font-style: italic;
} }
@font-face { @font-face {
font-family: "Lete Sans Math"; font-family: "Lete Sans Math";
src: url("/fonts/LeteSansMath.woff2") format("woff2"); src: url("/fonts/LeteSansMath.woff2") format("woff2");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: "Lete Sans Math"; font-family: "Lete Sans Math";
src: url("/fonts/LeteSansMath-Bold.woff2") format("woff2"); src: url("/fonts/LeteSansMath-Bold.woff2") format("woff2");
font-weight: bold; font-weight: bold;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: "IosevkaC"; font-family: "IosevkaC";
src: url("/fonts/IosevkaCustom-Regular.woff2") format("woff2"); src: url("/fonts/IosevkaCustom-Regular.woff2") format("woff2");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: "IosevkaC"; font-family: "IosevkaC";
src: url("/fonts/IosevkaCustom-Bold.woff2") format("woff2"); src: url("/fonts/IosevkaCustom-Bold.woff2") format("woff2");
font-weight: bold; font-weight: bold;
font-style: normal; font-style: normal;
} }