What does @at-root do?

Asked

Viewed 771 times

2

Well I used the translator to read is SASS documentation and I don’t understand what he can do... so:

  • What the @at-root ago?

1 answer

5


@at-root is a directive. It works for 'jump' from where you nestled in your Sass to a higher level.

For example, you can use it like this:

h1 {
    font-size: 16px;
    @at-root {
        header {
            margin: 0 auto;
            width: 98%;
        }
    }
}

And the result is:

h1 {
    font-size: 16px;
}

header {
    margin: 0 auto;
    width: 98%;
}

Source

Browser other questions tagged

You are not signed in. Login or sign up in order to post.