Created
April 10, 2011 16:55
-
-
Save agibralter/912518 to your computer and use it in GitHub Desktop.
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
| // (Using compass's border-radius mixin) | |
| .br-2-2-0-0 { | |
| @include border-radius(2px 2px 0 0); | |
| } | |
| .br-0-0-2-2 { | |
| @include border-radius(0 0 2px 2px); | |
| } | |
| .br-2-0-0-2 { | |
| @include border-radius(2px 0 0 2px); | |
| } | |
| .br-0-2-2-0 { | |
| @include border-radius(0 2px 2px 0); | |
| } |
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
| @import "border_radius"; | |
| // I find myself doing this to avoid packing my css files with the 5 lines it takes to define a cross-browser border radius | |
| #foo-1 { | |
| @extend .br-2-2-0-0; | |
| } | |
| #foo-2 { | |
| @extend .br-2-2-0-0; | |
| } | |
| #foo-3 { | |
| @extend .br-2-2-0-0; | |
| } | |
| // BUT! | |
| // I would love to be able to do something like this: | |
| #foo { | |
| @include my-border-radius(2px, 2px, 0, 0); | |
| } | |
| // ... which would define a top level class: | |
| .br-2px-2px-0-0 { | |
| @include border-radius(2px 2px 0 0); | |
| } | |
| // ... and extend the current selector with that class: | |
| #foo { | |
| @extend .br-2px-2px-0-0; | |
| } | |
| // ... that way the border-radius/-moz-border-radius/-webkit-border-radius for 2-2-0-0 only appears once in the generated css. |
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
| @import "border_radius"; | |
| #bar-1 { | |
| @extend .br-2-0-0-2; | |
| } | |
| #bar-2 { | |
| @extend .br-2-0-0-2; | |
| } | |
| #bar-3 { | |
| @extend .br-2-0-0-2; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment