Answer the question
In order to leave comments, you need to log in
Why does gulp-sass compile css preserve selector nesting hierarchy instead of starting on a new line?
Why is this
SASS moment happening
/*HEADER*/
.header
padding: 8px 0
background: #0050B3
/*Search Form*/
&-form
position: relative
width: 336px
&__input
width: 100%
padding: 5px 30px 5px 12px
border: 1px solid #D9D9D9
border-radius: 4px
background: #fff
font-family: 'Source Sans Pro', sans-serif
font-size: 14px
font-weight: 400
line-height: 1.57
color: $text-color
&::placeholder
color: #BFBFBF
/*HEADER*/
.header {
padding: 8px 0;
background: #0050B3;
/*Search Form*/
/*Navigation*/
/*Social icons*/
/*Info icons*/ }
.header-form {
position: relative;
width: 336px; }
.header-form__input {
width: 100%;
padding: 5px 30px 5px 12px;
border: 1px solid #D9D9D9;
border-radius: 4px;
background: #fff;
font-family: 'Source Sans Pro', sans-serif;
font-size: 14px;
font-weight: 400;
line-height: 1.57;
color: #595959; }
.header-form__input::placeholder {
color: #BFBFBF; }
.navigation-block {
display: block;
width: 100%;
background: #373737;
min-height: 40px;
position: fixed;
top: 0;
left: 0;
z-index: 900;
-webkit-transition: all 0.5s ease;
transition: all 0.5s ease;
}
.navigation-block__list {
padding: 0;
margin: 0;
list-style: none;
display: -webkit-box;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
flex-direction: row;
-webkit-box-pack: center;
justify-content: center;
}
.navigation-block__item {
text-align: center;
border-left: 1px dashed #9d9d9d;
}
.navigation-block__item:first-child {
border-left: none;
}
function styles() {
return src('src/sass/*.sass') // Подключаем sass файлы
.pipe(sass())
.pipe(concat('style.min.css')) // Конкатенируем файл
//.pipe(autoprefixer({ overrideBrowserslist: ['last 10 versions'], grid: false })) // Создадим префиксы с помощью Autoprefixer
//pipe(cleancss( { level: { 1: { specialComments: 0 } }/* , format: 'beautify' */ } )) // Минифицируем стили
.pipe(dest('src/css/')) // Выгрузим результат в папку "app/css/"
.pipe(browserSync.stream()) // Сделаем инъекцию в браузер
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question