Created
January 29, 2014 15:53
-
-
Save kaseybon/8690896 to your computer and use it in GitHub Desktop.
This file contains 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
@baseFont: 16; | |
@outer: 50; | |
@margin: 20; | |
// Mixins | |
.inner-box() { | |
@inner: @outer - @margin; | |
@innerRem: @inner / @baseFont; | |
@MarginRem: @margin / @baseFont; | |
border-radius: ~"@{inner}px"; | |
border-radius: ~"@{innerRem}rem"; | |
margin: 0 ~"@{margin}px"; | |
margin: 0 ~"@{MarginRem}rem"; | |
padding: 0 ~"@{margin}px"; | |
padding: 0 ~"@{MarginRem}rem"; | |
} | |
.outer-box() { | |
@outerRem: @outer / @baseFont; | |
@padding: @margin; | |
@paddingRem: @margin / @baseFont; | |
border-radius: ~"@{outer}px"; | |
border-radius: ~"@{outerRem}rem"; | |
padding: ~"@{padding}px" 0; | |
padding: ~"@{paddingRem}rem" 0; | |
} | |
// CSS | |
.outer { | |
.outer-box(); | |
} | |
.inner { | |
.inner-box(); | |
} |
This file contains 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
<section class="outer container"> | |
<aside class="inner container"> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at odio faucibus, venenatis quam vel, dapibus massa. Quisque bibendum in ante in ultrices. Phasellus viverra egestas sapien, in euismod elit auctor eget. Vivamus vitae justo tellus. Morbi fermentum pretium tortor non euismod.</p> | |
</aside> | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment