瀏覽代碼

feat: add CSS postprocessing support

Enabled with env `WC_POST_CSS="true"`
George Cushen 4 年之前
父節點
當前提交
362cb1510b
共有 2 個文件被更改,包括 8 次插入1 次删除
  1. 5 1
      wowchemy/assets/scss/wowchemy/_book.scss
  2. 3 0
      wowchemy/layouts/partials/site_head.html

+ 5 - 1
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;

+ 3 - 0
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 -}}