Fix: postcss config + checking that it works changing stuff in main.css
This commit is contained in:
parent
05334d7887
commit
4278934bd6
@ -1,8 +1,8 @@
|
|||||||
/* Basic */
|
/* Basic */
|
||||||
/* @import 'https://fonts.googleapis.com/css2?family=Overpass+Mono:wght@400;700&display=swap';
|
@import 'https://fonts.googleapis.com/css2?family=Overpass+Mono:wght@400;700&display=swap';
|
||||||
@import 'normalize.css';
|
@import 'assets/css/normalize.css';
|
||||||
@import 'variables.css';
|
@import 'assets/css/variables.css';
|
||||||
@import 'common.css'; */
|
@import 'assets/css/common.css';
|
||||||
|
|
||||||
/* Layout */
|
/* Layout */
|
||||||
|
|
||||||
|
15
src/themes/oscar/assets/css/postcss.config.js
Normal file
15
src/themes/oscar/assets/css/postcss.config.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
const themeDir = __dirname + '/../../';
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
plugins: [
|
||||||
|
require('postcss-import')({
|
||||||
|
path: [themeDir]
|
||||||
|
}),
|
||||||
|
require('postcss-custom-media')({
|
||||||
|
path: [themeDir]
|
||||||
|
}),
|
||||||
|
require('postcss-nested')({
|
||||||
|
path: [themeDir]
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
}
|
@ -11,9 +11,8 @@
|
|||||||
|
|
||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
{{- $inServerMode := .Site.IsServer }}
|
{{- $inServerMode := .Site.IsServer }}
|
||||||
{{- $cssTarget := "css/style.css" }}
|
{{ $options := dict "config" "assets/css/postcss.config.js" }}
|
||||||
{{- $cssOptions := cond ($inServerMode) (dict "targetPath" $cssTarget "enableSourceMap" true) (dict "targetPath" $cssTarget "outputStyle" "compressed") }}
|
{{ $style := resources.Get "css/main.css" | resources.PostCSS $options }}
|
||||||
{{- $style := resources.Get "css/main.css" | toCSS $cssOptions }}
|
|
||||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||||
<link rel="stylesheet" href="{{ "css/fonts.css" | relURL }}">
|
<link rel="stylesheet" href="{{ "css/fonts.css" | relURL }}">
|
||||||
{{ range .Site.Params.css -}}
|
{{ range .Site.Params.css -}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user