If the project is in a right-to-left language (such as Persian or Arabic), which method is preferable for setting text-align: right
and direction: rtl
?
Option 1: Implement globally, for example:
body * { direction: rtl; text-align: right; }
Option 2: Implement on-demand, meaning apply
direction: rtl
ortext-align: right
where needed.
The on-demand approach may lead to more lines of code, such as:
.btn {
direction: rtl;
text-align: right;
}
.nav {
direction: rtl;
text-align: right;
}
.footer {
direction: rtl;
text-align: right;
}
Is this correct? Which method is considered more standard?