Checkmate icon indicating copy to clipboard operation
Checkmate copied to clipboard

FE - Font-sizes should adjust to user settings

Open marcelluscaio opened this issue 1 year ago • 12 comments

Is your feature request related to a problem? Please describe. Fonts are declared using px, and that does not respect user's settings, violating WCAG Success Criterion 1.4.4 (https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-scale.html_

Describe the solution you'd like Fonts can be declared using the REM unit

Describe alternatives you've considered I cannot think of an alternative.

marcelluscaio avatar Oct 22 '24 23:10 marcelluscaio

Are there any SaaS projects that do this so I can check? And how does one change the user's settings so the app respects it?

gorkem-bwl avatar Oct 22 '24 23:10 gorkem-bwl

Forget what I said earlier :) I’ve watched two videos and feel I got the point. I just suggest we prioritize addressing small bugs and building our infrastructure monitoring first. After we launch version 2.0, we can tackle this issue. What do you think?

gorkem-bwl avatar Oct 22 '24 23:10 gorkem-bwl

I'm on board for this issue after @marcelluscaio 's presentation this morning :+1:

After infrastructure monitoring we can work on this and perhaps the big boogeyman, responsive design :ghost:

ajhollid avatar Oct 25 '24 02:10 ajhollid

Hello ! Is this issue still relevant and can I be assigned to this if it is the case?

blastoncrush avatar Apr 13 '25 22:04 blastoncrush

Hello @blastoncrush - sure, it's still relevant. Can you please give us some more information about what you are going to do, very shortly, so we are all on the same page?

gorkem-bwl avatar Apr 14 '25 20:04 gorkem-bwl

Hello @gorkem-bwl ! Thanks for the quick answer. I think I will start by changing all px sizes by equivalent rem size (using a converter), starting by this file : https://github.com/bluewave-labs/Checkmate/blob/develop/src/index.css Then let me know if there are other files to adress :)

blastoncrush avatar Apr 15 '25 14:04 blastoncrush

Let's go! :)

gorkem-bwl avatar Apr 15 '25 15:04 gorkem-bwl

I have automated the task by using a python programm and using the conversion 1rem = 16px

blastoncrush avatar Apr 15 '25 16:04 blastoncrush

Hi @blastoncrush ,

I see your open PR on this, however we are moving away from using CSS at all.

Fonts are set in the theme and should not be overridden by CSS:

const typographyBase = 13;

const typographyLevels = {
	base: typographyBase,
	xs: `${(typographyBase - 4) / 16}rem`,
	s: `${(typographyBase - 2) / 16}rem`,
	m: `${typographyBase / 16}rem`,
	l: `${(typographyBase + 2) / 16}rem`,
	xl: `${(typographyBase + 10) / 16}rem`,
};

All that should be required to set the font size on a per user basis should be to make the typographyBase value configurable.

All CSS set font sizes should be removed entirely really.

Relevant docs here

ajhollid avatar Apr 15 '25 16:04 ajhollid

Hello @ajhollid, thanks for the answer. I don't understand the issue : in the code you show, fonts are declared using rem, not px

blastoncrush avatar Apr 15 '25 17:04 blastoncrush

In the file your talking about (https://github.com/bluewave-labs/Checkmate/blob/7df42357cdb3682150d6bcaad49eb5ac07d90374/src/Utils/Theme/constants.js#L1), it is written that every px should be replaced by rem ; that was the point of my pr (maybe the problem is that I'm not limiting only to fonts)

blastoncrush avatar Apr 15 '25 20:04 blastoncrush

Hi! Can I work in this?

IsraelMancha avatar Sep 10 '25 21:09 IsraelMancha