Skip to content

Commit

Permalink
fix: updated font style to only affect calendar widget and its children
Browse files Browse the repository at this point in the history
  • Loading branch information
syam babu committed Oct 10, 2024
1 parent 3ce989d commit 0f3dc34
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#calendar-widget {
height: 100%;
font-family: Roboto;
}

#calendar-widget .loader-wrapper {
Expand Down
2 changes: 0 additions & 2 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ html {
body {
margin: 0;
padding: 0;
font-family: Roboto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
max-width: 100vw !important;
/* max-height: 100vh; */
height: 100%;
}

Expand Down
6 changes: 5 additions & 1 deletion src/utils/dynamicStylePropertyInjector.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@ export const dynamicFontInjector = (fontName) => {
)}&display=swap`;

document.head.appendChild(fontLink);
document.body.style.fontFamily = `'${fontName}', sans-serif`;

const calendarWidget = document.getElementById('calendar-widget');
if (calendarWidget) {
calendarWidget.style.fontFamily = `'${fontName}', sans-serif`;
}
};

0 comments on commit 0f3dc34

Please sign in to comment.