diff --git a/content/notes/coronavirus-open-source/index.md b/content/notes/coronavirus-open-source/index.md index d155fec7..d49fa96d 100644 --- a/content/notes/coronavirus-open-source/index.md +++ b/content/notes/coronavirus-open-source/index.md @@ -10,13 +10,11 @@ tags: - GitHub image: "covid19dashboards.png" css: | - /* disable link underlines for octocats */ h2 a:last-child { - background-image: none !important; - padding-bottom: 0 !important; + background-image: none; + padding-bottom: 0; margin-left: 8px; } - /* align octocat with text */ h2 img { vertical-align: text-bottom; } diff --git a/content/notes/shodan-search-queries/index.md b/content/notes/shodan-search-queries/index.md index b344610c..e157473b 100644 --- a/content/notes/shodan-search-queries/index.md +++ b/content/notes/shodan-search-queries/index.md @@ -10,10 +10,9 @@ tags: - Dorking image: "shodan.png" css: | - /* disable hover underlines for search links */ h3 a:last-child, h4 a:last-child { - background-image: none !important; - padding-bottom: 0 !important; + background-image: none; + padding-bottom: 0; margin-left: 6px; } draft: false diff --git a/layouts/_default/single.amp.html b/layouts/_default/single.amp.html index 4da05127..03d0b4f4 100644 --- a/layouts/_default/single.amp.html +++ b/layouts/_default/single.amp.html @@ -219,7 +219,7 @@ {{/* Page-specific styles set via front matter */}} {{- with .Params.css }} - {{- . | safeCSS -}} + {{- replace . " !important" "" | safeCSS -}} {{ end -}} diff --git a/layouts/partials/head/styles.html b/layouts/partials/head/styles.html index 30995d40..463fc060 100644 --- a/layouts/partials/head/styles.html +++ b/layouts/partials/head/styles.html @@ -1,9 +1,12 @@ {{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "sass/main.scss" . | resources.ToCSS (dict "targetPath" "style.css") | resources.PostCSS (dict "config" "postcss.config.js") }} -{{/* Page-specific styles set via front matter */}} +{{/* Page-specific styles set via front matter, scoped via SCSS */}} {{ with .Params.css }} - + {{- $sass := printf "div#content { %s }" . }} + {{- $target := path.Join $.File.Dir "inline.scss" }} + + {{- $css := $sass | resources.FromString $target | resources.ToCSS | resources.PostCSS (dict "config" "postcss.config.js") -}} + + {{ end }}