Closed
Description
An example says it best:
@margin: 1px 2px 3px;
.ruleset {
margin-top: top(@margin); // Outputs "1px"
margin-right: right(@margin); // Outputs "2px"
margin-left: left(@margin); // Outputs "2px"
}
When I have a variable that holds a margin (in shorthand syntax), I would like to be able to extract the top/bottom/left/right values.
I have several mixins that require @Margin and @padding as parameters, but I need to break it down into -top, -bottom, -left, and -right. Currently, I have 8 separate variables, which makes the mixin much harder to use and way too verbose.