aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-01-29 07:54:19 +0100
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-01-29 07:54:19 +0100
commitd392cc63f7e4d63a999db1fd551709452bfbe8b4 (patch)
tree3406213215382cbb7029e4fc27512009ab253474
parent787d515c7aef945ce40278d51dd9a0900726561e (diff)
CSS reset
-rw-r--r--README.md1
-rw-r--r--assets/css/reset.css145
-rw-r--r--layouts/partials/head/styles.html6
3 files changed, 150 insertions, 2 deletions
diff --git a/README.md b/README.md
index d62bb6e..e5bf6e6 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,7 @@
- [ ] Table of content: `tableOfContents: true`
- [ ] Unified CSS reset
- [ ] Use minify in production?
+- [ ] Multi parts series
## Guidelines
diff --git a/assets/css/reset.css b/assets/css/reset.css
new file mode 100644
index 0000000..6b39b0e
--- /dev/null
+++ b/assets/css/reset.css
@@ -0,0 +1,145 @@
+/* http://meyerweb.com/eric/tools/css/reset/
+ v2.0 | 20110126
+ License: none (public domain)
+*/
+
+html,
+body,
+div,
+span,
+applet,
+object,
+iframe,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+blockquote,
+pre,
+a,
+abbr,
+acronym,
+address,
+big,
+cite,
+code,
+del,
+dfn,
+em,
+img,
+ins,
+kbd,
+q,
+s,
+samp,
+small,
+strike,
+strong,
+sub,
+sup,
+tt,
+var,
+b,
+u,
+i,
+center,
+dl,
+dt,
+dd,
+ol,
+ul,
+li,
+fieldset,
+form,
+label,
+legend,
+table,
+caption,
+tbody,
+tfoot,
+thead,
+tr,
+th,
+td,
+article,
+aside,
+canvas,
+details,
+embed,
+figure,
+figcaption,
+footer,
+header,
+hgroup,
+menu,
+nav,
+output,
+ruby,
+section,
+summary,
+time,
+mark,
+audio,
+video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+ box-sizing: border-box;
+
+}
+
+/* HTML5 display-role reset for older browsers */
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+menu,
+nav,
+section {
+ display: block;
+}
+
+body {
+ line-height: 1;
+}
+
+ol,
+ul {
+ list-style: none;
+}
+
+blockquote,
+q {
+ quotes: none;
+}
+
+blockquote:before,
+blockquote:after,
+q:before,
+q:after {
+ content: '';
+ content: none;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+:link {
+ text-decoration: inherit;
+}
+
+:visited {
+ color: inherit;
+} \ No newline at end of file
diff --git a/layouts/partials/head/styles.html b/layouts/partials/head/styles.html
index 03f336b..6f6c5b0 100644
--- a/layouts/partials/head/styles.html
+++ b/layouts/partials/head/styles.html
@@ -1,5 +1,7 @@
{{/* Resources */}}
-{{- $styles := resources.Get "css/main.css" -}}
+{{- $reset := resources.Get "css/reset.css" -}}
+{{- $main := resources.Get "css/main.css" -}}
+{{- $styles := slice $reset $main | resources.Concat "css/bundle.css" -}}
{{/* MathJax */}}
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML" defer></script>
@@ -13,6 +15,6 @@ document.addEventListener('DOMContentLoaded', function () {
{{- if eq hugo.Environment "development" -}}
<link rel="stylesheet" href="{{ $styles.Permalink | absURL }}" />
{{- else -}}
- {{- $styles := $styles | minify | fingerprint | resources.PostProcess -}}
+ {{- $styles := $styles | minify | fingerprint -}}
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" />
{{- end -}}