Skip to content

Commit a1d3775

Browse files
authored
fix: Set correct font-weight to variable font (#4550)
Some `font-weight` CSS directives do not work on Cozy apps. For example, in this screenshot from cozy-settings, "Add an additional security level" has `font-weight: 500` set by cozy-ui but it is not taken into account. <img width="551" height="664" alt="Screenshot 2025-07-18 at 16 53 52" src="https://github.com/user-attachments/assets/e311ba69-1a75-4c8c-8aa8-b3d4d52d8022" /> It seems that setting a range in [@font-face](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-weight#syntax) like in this PR solves the issue. It worked by changing it directly in Firefox developer tools but in this PR it does not. So to summarize : - There is an issue with font weight - I think it is related to how we use @font-face - This PR does not fix it Did I miss something ?
2 parents f3ccb87 + 9536543 commit a1d3775

4 files changed

Lines changed: 7347 additions & 7569 deletions

File tree

-854 KB
Binary file not shown.

assets/fonts/InterVariable.woff2

344 KB
Binary file not shown.

assets/fonts/fonts.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@font-face {
22
font-family: Inter;
33
font-style: normal;
4-
font-weight: normal;
5-
src: url("../fonts/Inter-VariableFont_opsz,wght.ttf");
4+
font-weight: 100 900;
5+
src: url("InterVariable.woff2");
66
font-display: fallback;
77
}

0 commit comments

Comments
 (0)