L
L
lilandre2017-10-04 15:22:56
css
lilandre, 2017-10-04 15:22:56

What do you think is the best solution for using media queries with Sass?

Good afternoon. Learning layout with Gulp and using Sass. Developed a site for a resolution of 1280. Now it's time to adapt the site for other displays. What solution or library do you think is the most efficient for working with media queries in Sass ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alvvi, 2017-10-04
@lilandre

sass-lang.com/documentation/file.SASS_REFERENCE.ht... here for scss
for syntax with spaces instead of brackets, you just need to replace the brackets with spaces

@media (max-width: 320px) 
  .hello 
    rule: value

// а лучше

.hello
  @media (max-width: 320px)
    rule: value

M
myaca, 2017-10-04
@myaca

Add the following inside the required class:
@media(max-width: $someWidth){
/* styles */
}
This is usually done... Why use any other libraries?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question