From 362cb1510b5aa40123e5c82e76b16716786e2c7b Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sun, 10 Jan 2021 17:23:17 +0000 Subject: [PATCH] feat: add CSS postprocessing support Enabled with env `WC_POST_CSS="true"` --- wowchemy/assets/scss/wowchemy/_book.scss | 6 +++++- wowchemy/layouts/partials/site_head.html | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/wowchemy/assets/scss/wowchemy/_book.scss b/wowchemy/assets/scss/wowchemy/_book.scss index 862b7fe7..7d493610 100644 --- a/wowchemy/assets/scss/wowchemy/_book.scss +++ b/wowchemy/assets/scss/wowchemy/_book.scss @@ -42,6 +42,10 @@ margin-right: -15px; margin-left: -15px; border-bottom: 1px solid rgba(0, 0, 0, 0.05); + + @include media-breakpoint-down(sm) { + padding: 0.8rem 15px; + } } .docs-search .form-control:focus { @@ -127,7 +131,7 @@ /* Docs links. */ .docs-toggle { - line-height: 1; + line-height: 1.5; font-size: 1.2rem; color: $sta-primary; background-color: transparent; diff --git a/wowchemy/layouts/partials/site_head.html b/wowchemy/layouts/partials/site_head.html index b29629b8..0095b83b 100644 --- a/wowchemy/layouts/partials/site_head.html +++ b/wowchemy/layouts/partials/site_head.html @@ -158,6 +158,9 @@ {{- $style = $style | minify -}} {{- end -}} {{ $style := slice $css_bundle_head $style | resources.Concat "css/wowchemy.css" }} + {{- if eq (getenv "WC_POST_CSS") "true" -}} + {{- $style = $style | postCSS -}} + {{- end -}} {{- if eq hugo.Environment "production" -}} {{- $style = $style | fingerprint "md5" -}} {{- end -}}