Answer the question
In order to leave comments, you need to log in
When is it better to use @extend, when is it better to use @include, and when is it better to use a mix of classes in SASS?
There is an abstract page
.header
.container // 1-йвариант
.header__logo
.header__search
.header__menu
.content
.content__line
.intro.container // 2-й вариант
.content__line
.article // 3-й и 4-й варианты
.footer
.container {
width: 960px;
margin: 0 auto;
}
Answer the question
In order to leave comments, you need to log in
I think it's better to include a mixin with horizontal and vertical alignment (depending on what you want)
@mixin centerer($horizontal: true, $vertical: true) {
position: absolute;
@if ($horizontal and $vertical) {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} @else if ($horizontal) {
left: 50%;
transform: translate(-50%, 0);
} @else if ($vertical) {
top: 50%;
transform: translate(0, -50%);
}
}
.container лучше прописывать в html, код более читаемый будет
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question