Media / responsives modifiers

Exemple :

<button class="
    ga-button
    ga-button--small
    ga-button--large@from-medium
    gu-hide@print
    ">
    button text
<button>

here we instantiated a class that tell us that the button will be a large one from medium screen and a utility telling us that the button should be hidden for print.

in css, we need to escape the @ :

.ga-button {
    &--large {
        /* large option styles */    
    }
    
    @media screen and (min-width = 720px) {
        &--large\@from-medium {
            /* large option styles */    
        }
    }
}

Last updated

Was this helpful?