shayo-rtl
v0.0.2
Published
Rtl. shayo-rtl is a fork from @material/rtl.
Downloads
2
Readme
shayo-rtl
0.0.2
Rtl.
shayo-rtl is a fork from @material/rtl.
Installation
$ npm install shayo-rtl
Usage
Sass
@import "path/to/node_modules/shayo-rtl/rtl";
.foo {
position: absolute;
left: 0;
@include s-rtl {
right: 0;
left: auto;
}
&__bar {
margin-left: 0.25rem;
@include s-rtl(".foo") {
margin-right: 0.25rem;
margin-left: auto;
}
}
}
.foo {
@include s-rtl-reflexive-box("margin", "left", 0.5rem);
}
.foo {
position: absolute;
@include s-rtl-reflexive-position("left", 0);
}
Css
.foo {
position: absolute;
left: 0;
}
[dir="rtl"] .foo, .foo[dir="rtl"] {
right: 0;
left: auto;
}
.foo__bar {
margin-left: 0.25rem;
}
.foo[dir="rtl"] .foo__bar,
[dir="rtl"] .foo .foo__bar {
margin-right: 0.25rem;
margin-left: auto;
}
.foo {
margin-right: 0;
margin-left: 0.5rem;
}
[dir="rtl"] .foo, .foo[dir="rtl"] {
margin-right: 0.5rem;
margin-left: 0;
}
.foo {
position: absolute;
right: initial;
left: 0;
}
[dir="rtl"] .foo, .foo[dir="rtl"] {
right: 0;
left: initial;
}
Author
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit creativecommons.org/licenses.