When a CSS stylesheet is included, you can specify the media query directly on the link
tag with the condition that must be met for those styles to apply:
<link rel="stylesheet" media="(max-width: 480px)" href="moviles.css" />
Is there something similar but for the browser language? Or at least for the case of text from right to left (ex .: Arabic)? Something like this:
<link rel="stylesheet" media="(lang: ar)" href="rtl.css" />
Where the style sheet would only contain things like:
.flota-izquierda { float: right; }
.float-derecha { float:left; }
.izquierda { text-align: right; }
.derecha { text-align: left; }
....
I know I could use LESS / SASS to simplify my source code, but the CSS generated when compiling would still be complex and large anyway, because by expanding it would look like:
[lang=ar] .flota-izquierda { float: right; } [lang=ar] .float-derecha { float:left; } [lang=ar] .izquierda { text-align: right; } [lang=ar] .derecha { text-align: left; } ....
I would prefer an answer that only uses HTML and CSS, but if there is no option, JavaScript would also be a possibility to consider.