C
C
Cyberial Syntwaiser2019-11-15 03:32:24
Sass
Cyberial Syntwaiser, 2019-11-15 03:32:24

How to include the main style files for development, so that each time they are not imported into other sass files?

I prescribe sass, scss styles near each component, and it turns out that for each file I need to connect my @mixin and variables in the form - $fz50h: 50px; which are in a separate file, how to connect it for the project? So that each style file does not prescribe a similar construction?

@import '../../css/base/typography'
@import '../../css/base/mixin'

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey delphinpro, 2019-11-15
@Cyberial

Here I showed how it's done in Vue. VueJS: where is the best place to store css, in .vue components or main.css?
Since the whole point is in setting up a webpack loader, you can also tie it to react

N
natalia1satsyuk, 2020-03-14
@natalia1satsyuk

Place the files with the main styles in a folder, for example, "base";
Place files with other styles (modules, components) in another folder, for example, "other";
And at the same level with these folders, create a file, for example style.scss, where import the main style.scss from the base folder and the main style.scss from the other folder.

M
McBernar, 2019-11-15
@McBernar

in app.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question