aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/templates/page
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-12-20 17:09:39 +0100
committerArmand Philippot <git@armandphilippot.com>2023-12-20 17:09:39 +0100
commiteef0dd0fafa5dbbbd29f2162967bc668eebf6074 (patch)
tree077062962f649b36356262e8b7052292fc9008d9 /src/components/templates/page
parent5a572163c5a5174c1620c578f550dd7ddc841df4 (diff)
fix(styles): increase CSS specifity for some selectors
Since `sideEffects` has been added to activate tree shakings, the styles are imported in the wrong order in production build. There is an open issue (again) on Next.js repo. I'm not sure it will be fixed soon so in the meantime I had to increase the specifity of some selectors to avoid broken styles. I also fixed two minor layout errors: * CV page widgets should use headings of level 2 * Homepage should wrap the cards in list items
Diffstat (limited to 'src/components/templates/page')
-rw-r--r--src/components/templates/page/page.module.scss12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/components/templates/page/page.module.scss b/src/components/templates/page/page.module.scss
index 91a1b58..fd1fac9 100644
--- a/src/components/templates/page/page.module.scss
+++ b/src/components/templates/page/page.module.scss
@@ -204,6 +204,13 @@
&__body {
grid-column: 2;
}
+
+ /* Without nesting, Nextjs does not override margin: the CSS is bundle in the
+ * wrong order. */
+ .heading {
+ width: fit-content;
+ margin: var(--spacing-md) auto;
+ }
}
.spinner {
@@ -211,11 +218,6 @@
}
:where(.comments) {
- .heading {
- width: fit-content;
- margin: var(--spacing-md) auto;
- }
-
.form {
max-width: 40ch;
margin-inline: auto;