V
V
Vera2018-05-02 14:01:27
css
Vera, 2018-05-02 14:01:27

How to use @extend styles from another SCSS file and does it make sense?

Good afternoon!
I apologize in advance if this question has already been asked, but despite the extensive amount of information on the topic, I could not find an answer to my question.
The bottom line is this:
For example, I have two separate scss files - header.scss and footer.scss. The styles of the footer are almost exactly the same as the styles of the header, with the exception of a couple of properties.
But if I write @extend header in the footer.scss file, the header styles cannot be used, because it's a different file.
Tell me, what is the ideologically more correct thing to do in this situation? So that the new class/element receives the styles of the existing class from another file + add their own or change some styles to their own.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
profesor08, 2018-05-02
@profesor08

Because @extend doesn't work with files, it works with existing styles.
https://sass-scss.ru/documentation/pravila_i_direk...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question