Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Sass mixin as argument?

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #236059
    Akusai
    Participant

    Hi,

    Is it possible to pass a Sass mixin to another mixin or something similiar?

    The idea:

    @mixin red($selector) {
        #{$selector} {
             color: red;
        }
    
    }
    
    @mixin generateMobile($selector, $mixin) {
       @media (max-width: 320px) {
            @include $mixin('#{$selector}-at-mobile');
        }
    }
    
Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.