Browse Source

make 'customVars' accessible as CSS-variables

master
Dom SP 3 years ago
parent
commit
6456d5676e
3 changed files with 14 additions and 2 deletions
  1. +6
    -0
      app/views/colors.css
  2. +3
    -1
      main.cfg.sample
  3. +5
    -1
      rsc/sass/_colours.scss

+ 6
- 0
app/views/colors.css View File

background-attachment: fixed; background-attachment: fixed;
background-size: 2000px 2000px; background-size: 2000px 2000px;
} }

<repeat group="{{ @customVars }}" key="{{ @ikey }}" value="{{ @ivalue }}">
:root {
--{{ @ikey }}: {{ $@ikey }};
}
</repeat>

+ 3
- 1
main.cfg.sample View File

;; "customVars" are global (in F3) and can be changed in content files ;; "customVars" are global (in F3) and can be changed in content files
[customVars] [customVars]
backgroundColor=#fff backgroundColor=#fff
info1=test
color1=#333
color2=#777
color3=#bbb


[globals] [globals]
title=Title of new Page title=Title of new Page

+ 5
- 1
rsc/sass/_colours.scss View File

$black:#000; $black:#000;
$gray:#777; $gray:#777;



:root {
--color1: red;
--color2: green;
--color3: blue;
}


html { html {
color:$gray; color:$gray;

Loading…
Cancel
Save