Created
March 26, 2014 02:38
-
-
Save roubaobaozi/9775949 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="someclass notip">notip</div> | |
<div class="someclass">not notip</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.4) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
$dropdown-width: 100px; | |
$comp-tip: true; | |
@mixin tip($pos:right) { | |
} | |
@mixin dropdown-pos($pos:right) { | |
&:not(.notip) { | |
@if $comp-tip == true{ | |
@if $pos == right { | |
top:$dropdown-width * -0.6; | |
background-color: #f00; | |
@include tip($pos:$pos); | |
} | |
} | |
} | |
&.notip { | |
@if $pos == right { | |
top: 0; | |
left:$dropdown-width * 0.8; | |
background-color: #00f; | |
} | |
} | |
} | |
.someclass { @include dropdown-pos(); } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.someclass:not(.notip) { | |
top: -60px; | |
background-color: #f00; | |
} | |
.someclass.notip { | |
top: 0; | |
left: 80px; | |
background-color: #00f; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="someclass notip">notip</div> | |
<div class="someclass">not notip</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment