Forums

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

Home Forums CSS SASS @mixin urgent

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #42729
    Phper
    Member

    Hi.
    1) With .scss i wrote this:
    @mixin radius($radius1,$radius2){
    **border-radius: $radius1 $radius2 / $radius2 $radius1;**
    }

    But here, “/” forward slash is accepted as Dividing sign i guess. If i say
    **@include radius (30px,20px),**
    i get in CSS
    **border-radius: 30px 1 30px;**
    How to solve it?

    2)Again, in SASS
    @mixin translate($type, $value){
    transform: $type($value);
    -moz-transform: $type($value);
    }

    . I use
    @include translate(rotate,30deg)
    But it compiles to CSS as like this :
    transform: rotate 30deg;
    Parantheses disappear ?

    #124597
    Phper
    Member

    First one is solved, i should use “border-radius: #{$radius1} #{$radius2} / #{$radius2} #{$radius1};

    What about second?

    #124598
    Paulie_D
    Member

    LOL at thread title!

    Urgent CSS :)

    #124600
    Phper
    Member

    OK, i solved second two :D I should use
    @mixin translate($me){
    transform: $me;
    }

    And call it as like :
    @include translate(rotate(30deg));

    Thanx for reading ;)

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.