Hi,
With recent FxOS release, we use several new CSS syntax to deal with
left/right(LTR/RTL) issues. I feel it might be useful for general web
developers.
So I write a postcss (like Babel for CSS) plugin to translate these syntax
into current physical directions (left/right) properties and values in
build time.
For example, input syntax:
.foo {
text-align: start;
}
will be compiled to
.foo {
text-align: left;
}
html[dir="rtl"] .foo {
text-align: right;
}
It enable web developer to use these syntax now.
And if we do the similar thing for other moz-only CSS syntax, we are able
to publish a 'preview' version of FxOS Building Block/Components CSS styles
for web developers.
[1]
https://gniithub.com/mozilla-b2g/gaia/blob/master/apps/settings/style/settings.css
[2] https://github.com/gasolin/postcss-bidirection
--
Fred
_______________________________________________
dev-fxos mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-fxos