Created
May 2, 2014 18:18
-
-
Save jdsteinbach/11482335 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
| // ---- | |
| // Sass (v3.3.6) | |
| // Compass (v1.0.0.alpha.18) | |
| // ---- | |
| /* Here's my mixin, but it will repeat itself too much for my taste: */ | |
| @mixin grid() { | |
| width: 100%; | |
| &-item{ | |
| width: 33%; | |
| padding: 1em; | |
| } | |
| } | |
| .products { | |
| @include grid(); | |
| } | |
| .services { | |
| @include grid(); | |
| } | |
| /* Ah, here's a better way to use the mixin. | |
| Only problem is I have to use put all my parent classes in the same place. */ | |
| .products, | |
| .services { | |
| @include grid(); | |
| } |
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
| /* Here's my mixin, but it will repeat itself too much for my taste: */ | |
| .products { | |
| width: 100%; | |
| } | |
| .products-item { | |
| width: 33%; | |
| padding: 1em; | |
| } | |
| .services { | |
| width: 100%; | |
| } | |
| .services-item { | |
| width: 33%; | |
| padding: 1em; | |
| } | |
| /* Ah, here's a better way to use the mixin. | |
| Only problem is I have to use put all my parent classes in the same place. */ | |
| .products, | |
| .services { | |
| width: 100%; | |
| } | |
| .products-item, | |
| .services-item { | |
| width: 33%; | |
| padding: 1em; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment