The RTL SCSS is being added to the same files as the LTR SCSS. This results in a lot of unused CSS for those who aren't using any RTL languages
Rethink how you add RTL SCSS.
Perhaps generate a separate CSS file?
Labels |
Added:
?
|
but it would be very confusing when the specific css come from blocks or vendor and deal with various window sizes
I completely agree. It doesn't necessarily have to be a single RTL file that overrides everything though. It could still be kept on a per-block basis
Creating specific scss blocks for RTL would also be quite complex in the sense that the resulting rtl.css file would be enormous as, per default the LTR template is imported first.
Take the example of the PR above. Instead of a few lines added with [dir=rtl] & {
we would have to copy the whole file with its modifications for RTL.
Tbh I'd rather keep the RTL code in the same files - especially for the backend template where performance is less of a concern. It's going to keep it significantly more maintainable in the long term keeping the code linked together
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-01-29 10:03:26 |
Closed_By | ⇒ | C-Lodder |
We could indeed add all RTL stuff to template-rtl.scss as overrides but it would be very confusing when the specific css come from blocks or vendor and deal with various window sizes.
The solution used for example here #26613 is much easier.