Skip to content

Commit

Permalink
chore: enable dynamic font scaling (#1805)
Browse files Browse the repository at this point in the history
* Use dynamic font scaling

* Adjust styles for large font sizes
  • Loading branch information
mapsandapps authored Oct 4, 2023
1 parent d74e556 commit 466be86
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ ion-menu.md ion-list-header {
padding-right: 18px;
padding-left: 18px;

font-size: min(0.875rem, 32px);

font-weight: 450;

letter-spacing: .1em;
Expand Down Expand Up @@ -67,6 +69,8 @@ ion-menu.ios ion-list-header {

padding-right: 16px;
padding-left: 16px;

font-size: clamp(22px, 1.375rem, 40px);
}

ion-menu.ios ion-list {
Expand Down
8 changes: 8 additions & 0 deletions src/app/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@
/* stylelint-disable-next-line declaration-no-important */
display: none !important;
}

html {
/*
* For more information on dynamic font scaling, visit the documentation:
* https://ionicframework.com/docs/layout/dynamic-font-scaling
*/
--ion-dynamic-font: var(--ion-default-dynamic-font);
}
4 changes: 3 additions & 1 deletion src/app/pages/about/about.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ ion-toolbar ion-menu-button {
}

.about-info {
position: absolute;
position: relative;

margin-top: -10px;

border-radius: 10px;

background: var(--ion-background-color, #ffffff);

z-index: 2; // display rounded border above header image
}

.about-info h3 {
Expand Down

0 comments on commit 466be86

Please sign in to comment.