@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
border-radius: $radius;
}
.box { @include border-radius(10px); }
===============
// // A 16:9 ratio would look like this:
// .element {
// @include maintain-ratio(16 9);
// }
@mixin maintain-ratio($ratio: 1 1) {
@if length($ratio) < 2 or length($ratio) > 2 {
@warn "$ratio must be a list with two values.";
}
$width: 100%;
$height: percentage(nth($ratio, 2) / nth($ratio, 1));
width: $width;
height: 0;
padding-bottom: $height;
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.