E
E
EvgeniySaschenko2019-05-26 23:53:33
Sass
EvgeniySaschenko, 2019-05-26 23:53:33

How to put styles for pages in separate files in Vue.js, or make it inline?

I'm building Vue.js on vue-cli and sass. I use single-file components - I include vue, sass files in files using style:

<style>
@import 'btn.sass'
</style>

I would like common styles - the styles of the components that are used throughout the site ("Buttons", "Navigation", etc.) to be compiled into a common style.css, and the styles for individual pages into separate css files, or inserted inline on the necessary pages. But now the styles of the components and the styles of the pages are combined into one style.css, and this affects its weight. Please tell me how is this solved?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question