There are any shorthand for top right bottom left or for width and height ?
I have a lo
If you want shorthand for this, you're gonna need to make what's called a mixin with Sass. Don't know what it is? Look it up!
@mixin position($position, $args) {
@each $o in top right bottom left {
$i: index($args, $o);
@if $i and $i + 1< = length($args) and type-of(nth($args, $i + 1)) == number {
#{$o}: nth($args, $i + 1);
}
}
position: $position;
}
@mixin absolute($args) {
@include position("absolute", $args);
}
@mixin fixed($args) {
@include position("fixed", $args);
}
@mixin relative($args) {
@include position("relative", $args);
}
Here's a link that explains it:
http://hugogiraudel.com/2013/08/05/offsets-sass-mixin/