?
avatar C-Lodder
C-Lodder
18 Oct 2019

What needs to be fixed

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

How would you fix it

Rethink how you add RTL SCSS.
Perhaps generate a separate CSS file?

avatar C-Lodder C-Lodder - open - 18 Oct 2019
avatar joomla-cms-bot joomla-cms-bot - change - 18 Oct 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Oct 2019
avatar infograf768
infograf768 - comment - 18 Oct 2019

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.

avatar C-Lodder
C-Lodder - comment - 18 Oct 2019

@infograf768

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

avatar infograf768
infograf768 - comment - 18 Oct 2019

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.

avatar wilsonge
wilsonge - comment - 19 Oct 2019

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

avatar C-Lodder C-Lodder - change - 29 Jan 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-01-29 10:03:26
Closed_By C-Lodder
avatar C-Lodder C-Lodder - close - 29 Jan 2020

Add a Comment

Login with GitHub to post a comment