?
avatar nikosdion
nikosdion
21 Oct 2020

As I had already reported months ago, the default font size in Atum is too big. Yes, I understand that's the default Bootstrap and browser size albeit technically it's not exactly that.

First of all, Bootstrap 4's SCSS does allow you to set a different base font size instead of 1 rem. It's documented in it. Setting it to 0.875rem seems to be a better default and in line with literally every other site out there. I tried to file a PR to do that on the fly as we had discussed but I was told it's wrong even though that's exactly what we had agreed on AND what Bootstrap 4 recommends doing.

Furthermore, changing the font size from the browser's settings is not a viable solution for two reasons:

  1. It affects all sites, not just Joomla. Since all other sites using rems instead of absolute pt/px sizes set a base font size between 0.8 rem and 0.9 rem they end up with type too tiny for me to read.
  2. Chromium-based browsers such as Google Chrome, Microsoft Edge, Opera, Brave etc DO NOT have the option to change the based font size beyond "small", "medium", "large". The step from "medium" (16pt) to "small" is massive. One is too big to fit in the laptop display, the other is too small to read without a magnifying glass.

I honestly think that the right solution is changing the base font size as Bootstrap recommends. Since this is not something you want to consider I am asking you to find a magic solution. I am not going to participate further in the discussion as I've already told you why it's a problem and you have already rejected my solution (even though you agreed to it initially – and then you have the gall to tell me I'm "difficult" on Twitter, sigh). All I want is to be able to freaking use Joomla 4's backend WITHOUT having to add custom CSS. Is it too much to ask?

avatar nikosdion nikosdion - open - 21 Oct 2020
avatar joomla-cms-bot joomla-cms-bot - change - 21 Oct 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Oct 2020
avatar brianteeman
brianteeman - comment - 21 Oct 2020

see #31191

avatar nikosdion
nikosdion - comment - 21 Oct 2020

Your PR doesn't change the font size, it only changes the calculations in SCSS. You'd still need to recompile Atum's SCSS every time you want a different font size and it'd apply globally (all users) which we said it's wrong when we discussed in length about it between April and September.

The only viable way to make it all work correctly that I can see is having a base font size given as a client-side variable e.g. var(--joomla-base-font-size) with a default of 1 rem set in the template options. A control in the accessibility settings could change that variable the same way you've been able to change colors in Joomla 3 (and Atum, only that user-facing controls were yanked away).

This of course means that the calculations in your PR would have to be removed from SCSS side and done client-side. If I'm not mistaken (haven't checked) you could do something like $h1-font-size: calc(var(--joomla-base-font-size) * 1.65);. I am not sure if SCSS would like you for doing that because I THINK (without having checked; I may be wrong) that BS4's SCSS expects to see a compile-time calculated value there.

If using the var trick doesn't work then what you did is half of the solution, the other half being setting the font-size of the html element in CSS to modify the value of the rem unit. This is why my PR was doing exactly that but it was rejected. So my conclusion is that if you can't use var calculations in CSS you are completely sodden because changing the backend size requires recompiling SCSS and applies to all users, shooting down accessibility.

FWIW I have written a small plugin which sets the HTML element's font-size and I'm happy using that on my own site. I just want to know what the CSS luminaries in this community think is the best solution. Recompiling SCSS, accessibility be damned? Client-side calculations? Changing the HTML font size? Or nothing at all because who cares if real world people can use Joomla on real world computers which are primarily laptops (especially now, during the necessary work from home environment due to the Covid-19 pandemic)? I am asking because I heard as many opinions in my PR and not a single person would have the balls to come out and say "this is what we have to do and this is why, here are the references".

avatar brianteeman
brianteeman - comment - 21 Oct 2020

Ah I didnt realise you wanted it to be user defined

avatar nikosdion
nikosdion - comment - 21 Oct 2020

I can recompile SCSS anytime I please. It's how I am doing my custom J4 front end template. It doesn't make sense for Atum though. My changes would possibly be overwritten every upgrade and it would force all admins to use the same font size. That would be shooting our feet w.r.t. accessibility.

avatar brianteeman
brianteeman - comment - 21 Oct 2020

I am very confused.

I honestly think that the right solution is changing the base font size as Bootstrap recommends.

thats what i did

avatar brianteeman
brianteeman - comment - 22 Oct 2020

I do not see the need for this to be made configurable in the admin. I dont believe that you would have been suggesting it should be configurable if it had been at 0.875 originally. So we should just check and complete #31191 and stick with that.

avatar nikosdion nikosdion - change - 22 Oct 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-10-22 13:57:40
Closed_By nikosdion
avatar nikosdion nikosdion - close - 22 Oct 2020

Add a Comment

Login with GitHub to post a comment