How to Combine multiple inline media queries in sass?

By August 2, 2017 No Comments
Featured505 views
1

Sass’s media query duplication problem

I am working on project using sass, previously the media query was written in inline format.

.side-nav{
margin-right: 30px;
@media only screen and (max-width : $screen-sm) {
width:100%;
margin-right: 0px
}
}	
.sidebar{
width:240px;
border-right: 1px solid black; 
@media only screen and (max-width : $screen-sm) {
width:auto;
border-right: 0px solid black;
border-bottom: 1px solid black;
margin-right: 0px;
}
}

Now in the sass output file every time media query was repeated many times, i want to output all  of them in single media query,  I have check many solutions, but non of them work for me. Please someone tell me how to solve Sass’s media query duplication problem.

 

deleted comment
Add a Comment
Write your answer.

About Ravi Sharma