S
S
squadbrodyaga2021-02-17 12:07:05
Sass
squadbrodyaga, 2021-02-17 12:07:05

How to change return in a function with @media?

Hello, in general, is it possible to somehow combine a function and a media query, like this:

@function названиеФункции (что-то) {
  @return какой-то код
  
  @media (max-width: 720px) {
    @return а вот тут уже другой код
  }
}

How can this be implemented?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2021-02-17
@squadbrodyaga

No, It is Immpossible.
The function executes at compile time. The media query fires in the browser, in ready-made CSS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question