User tests: Successful: Unsuccessful:
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Templates (site) |
Something I've quickly mocked up if you are interested.
Mixin:
@mixin margin($position, $size) {
margin-#{$position}: $size;
$rtl-position: null;
@if $position == 'left' {
$rtl-position: right;
} @else if $position == 'right' {
$rtl-position: left;
}
@if $rtl-position != null {
[dir=rtl] & {
margin-#{$rtl-position}: $size;
}
}
}
Random element class:
.myClass {
display: block;
@include margin('left', 2rem);
}
This will add your desired RTL code and ignore top
and bottom
Labels |
Added:
?
|
Closed as we have a new pr
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-02-08 23:58:55 |
Closed_By | ⇒ | brianteeman |
With the amount of margins that have been tweaked for RTL, I don't know why you don't just create a SCSS mixin