Answer the question
In order to leave comments, you need to log in
How to change $primary in 4th bootstrap depending on page id?
The approximate structure of a project built with gulp, sass and bootstrap-4 is as follows:
site
libs
bootstrap
...
_variables.scss
sass
_libs.sass (здесь подключен бутстрап-4)
_vars.sass (здесь переопределяются стили бутстрапа)
main.sass (сюда подключены _libs.sass и _vars.sass и добавлены свои стили)
green.html
index.html
red.html
....html
gulpfile.js
package.json
<body id="red-page"></body>
<body id="green-page"></body>
#red-page
$primary: red
Answer the question
In order to leave comments, you need to log in
You make several files: main-default.scss, main-red.scss, etc.
In each write something like the following
$primary: red;
@import 'vars.scss';
…
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question