From 8e9c7209dcce64c8370223cbfa2d75e6a3b9744a Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Wed, 17 Sep 2025 09:52:08 +0200 Subject: [PATCH] Convert print and mobile styles to pure css. --- assets/sass/{mobilemenu.scss => mobilemenu.css} | 6 ++---- assets/sass/{print.scss => print.css} | 9 +++------ layouts/_partials/head/styles.html | 4 ++-- 3 files changed, 7 insertions(+), 12 deletions(-) rename assets/sass/{mobilemenu.scss => mobilemenu.css} (94%) rename assets/sass/{print.scss => print.css} (75%) diff --git a/assets/sass/mobilemenu.scss b/assets/sass/mobilemenu.css similarity index 94% rename from assets/sass/mobilemenu.scss rename to assets/sass/mobilemenu.css index 3d80c94..3b2b46f 100644 --- a/assets/sass/mobilemenu.scss +++ b/assets/sass/mobilemenu.css @@ -1,6 +1,4 @@ -// The mobile navigation stylesheet for this theme. - -@import 'init'; +/* The mobile navigation stylesheet for this theme. */ .mobile-nav { position: absolute; @@ -129,7 +127,7 @@ &__toggle, &__hamburger > rect, &__sheet { - // Add some transitions unless user prefer less motion. + /* Add some transitions unless user prefer less motion. */ @media (prefers-reduced-motion: no-preference) { transition: all 130ms ease-in; diff --git a/assets/sass/print.scss b/assets/sass/print.css similarity index 75% rename from assets/sass/print.scss rename to assets/sass/print.css index cf172fc..6440130 100644 --- a/assets/sass/print.scss +++ b/assets/sass/print.css @@ -1,9 +1,6 @@ -// The print stylesheet for this theme. - -@import 'init'; +/* The print stylesheet for this theme. */ .pager, -%pager, .mobile-nav, aside, nav, @@ -29,13 +26,13 @@ footer { width: 100%; } - // Underline all links. + /* Underline all links. */ :link, :visited { text-decoration: underline; } - // Add visible title after abbreviations. + /* Add visible title after abbreviations. */ abbr[title] { &::after { content: ' (' attr(title) ')'; diff --git a/layouts/_partials/head/styles.html b/layouts/_partials/head/styles.html index 87e0aad..7ce4a27 100644 --- a/layouts/_partials/head/styles.html +++ b/layouts/_partials/head/styles.html @@ -5,8 +5,8 @@ {{ $mobile_options := merge $main_options (dict "targetPath" "css/mobilemenu.css") -}} {{ $print_options := merge $main_options (dict "targetPath" "css/print.css") -}} {{ $main_style := resources.Get "sass/styles.scss" | toCSS $main_options -}} -{{ $mobile_style := resources.Get "sass/mobilemenu.scss" | toCSS $mobile_options -}} -{{ $print_style := resources.Get "sass/print.scss" | toCSS $print_options -}} +{{ $mobile_style := resources.Get "sass/mobilemenu.css" | toCSS $mobile_options -}} +{{ $print_style := resources.Get "sass/print.css" | toCSS $print_options -}} {{ if ne hugo.Environment "development" -}} {{ $main_style = $main_style | fingerprint -}} {{ $mobile_style = $mobile_style | fingerprint -}}