Skip to content

Commit 1a09e13

Browse files
authored
fix: The font face style tag is created only once (#1090)
1 parent 586c19b commit 1a09e13

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

packages/base/src/FontFace.js

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ const fontFaceCSS = `
5656
`;
5757

5858
const insertFontFace = () => {
59+
if (document.querySelector(`head>style[data-ui5-font-face]`)) {
60+
return;
61+
}
62+
5963
createStyleInHead(fontFaceCSS, { "data-ui5-font-face": "" });
6064
};
6165

packages/main/src/themes/List.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
box-sizing: border-box;
5353
-webkit-text-size-adjust: none; /* To improve readability Mobile Safari automatically increases the size of small text so let's disable this */
5454
font-size: var(--sapFontMediumSize);
55-
font-family: var(--sapFontFamily,var(--sapFontFamily,"72","72full",Arial,Helvetica,sans-serif));
55+
font-family: var(--sapFontFamily);
5656
line-height: 2rem;
5757
background-color: var(--sapList_FooterBackground);
5858
color: var(--ui5_list_footer_text_color);

packages/main/src/themes/Switch.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
min-width: 1.625rem;
7070
padding: 0 0.125rem;
7171
font-size: var(--sapFontSmallSize);
72-
font-family: "72","72full",Arial,Helvetica,sans-serif;
72+
font-family: var(--sapFontFamily);
7373
text-transform: uppercase;
7474
text-align: center;
7575
color: var(--sapTextColor);

packages/main/src/themes/TableCell.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:host {
22
display: contents;
3-
font-family: var(--sapFontFamily,var(--sapFontFamily,"72","72full",Arial,Helvetica,sans-serif));
3+
font-family: var(--sapFontFamily);
44
font-size: 0.875rem;
55
height: 100%;
66
box-sizing: border-box;

0 commit comments

Comments
 (0)