Fix font smoothing in BUI

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
Charles de Dreuille
2025-10-16 13:24:19 +01:00
parent 146e3fc24e
commit 4eb455ca15
5 changed files with 30 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/ui': patch
---
Fix font smoothing as default in Backstage UI.
File diff suppressed because one or more lines are too long
+2
View File
@@ -242,6 +242,8 @@
font-family: var(--bui-font-regular);
font-weight: var(--bui-font-weight-regular);
font-size: var(--bui-font-size-3);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
}
+6
View File
@@ -28,9 +28,15 @@
body {
background-color: var(--bui-bg);
/* Text defaults */
color: var(--bui-fg-primary);
font-family: var(--bui-font-regular);
font-weight: var(--bui-font-weight-regular);
font-size: var(--bui-font-size-3);
/* Smoothing for text rendering */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
}
+16 -6
View File
@@ -16,22 +16,32 @@ Use a better box model (opinionated).
box-sizing: border-box;
}
/**
1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
2. Correct the line height in all browsers.
3. Prevent adjustments of font size after orientation changes in iOS.
4. Use a more readable tab size (opinionated).
*/
html {
/* Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) */
font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji';
line-height: 1.15; /* 1. Correct the line height in all browsers. */
-webkit-text-size-adjust: 100%; /* 2. Prevent adjustments of font size after orientation changes in iOS. */
tab-size: 4; /* 3. Use a more readable tab size (opinionated). */
'Apple Color Emoji', 'Segoe UI Emoji'; /* 1 */
line-height: 1.15; /* 2 */
-webkit-text-size-adjust: 100%; /* 3 */
tab-size: 4; /* 4 */
}
/*
Sections
========
*/
/**
Remove the margin in all browsers.
*/
body {
margin: 0; /* Remove the margin in all browsers. */
margin: 0;
}
/*