Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable dynamic font scaling #122

Merged
merged 8 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
741 changes: 358 additions & 383 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@ionic/react": "^7.0.0",
"@ionic/react-router": "^7.0.0",
"date-fns": "^2.25.0",
"ionicons": "^5.0.1",
"ionicons": "^7.1.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^5.3.4",
Expand Down
14 changes: 14 additions & 0 deletions src/App.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* App Global CSS
* ----------------------------------------------------------------------------
* Put style rules here that you want to apply globally. These styles are for
* the entire app and not just one component.
*/

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);
}
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import '@ionic/react/css/display.css';

/* Theme variables */
import './theme/variables.css';
/* Global styles */
import './App.scss';
import MainTabs from './pages/MainTabs';
import { connect } from './data/connect';
import { AppContextProvider } from './data/AppContext';
Expand Down
10 changes: 9 additions & 1 deletion src/components/Menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ ion-menu.md ion-list-header {
padding-right: 18px;

text-transform: uppercase;
letter-spacing: .1em;
letter-spacing: 0.1em;
font-size: min(0.875rem, 32px);
liamdebeasi marked this conversation as resolved.
Show resolved Hide resolved
font-weight: 450;
}

Expand Down Expand Up @@ -66,6 +67,7 @@ ion-menu.ios ion-list-header {
padding-right: 16px;

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

ion-menu.ios ion-list {
Expand All @@ -85,3 +87,9 @@ ion-menu.ios ion-item ion-icon {
ion-menu.ios ion-item.selected ion-icon {
color: var(--ion-color-primary);
}

.tutorial-label {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
2 changes: 1 addition & 1 deletion src/components/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const Menu: React.FC<MenuProps> = ({
}}
>
<IonIcon slot="start" icon={hammer} />
Show Tutorial
<span className="tutorial-label">Show Tutorial</span>
mapsandapps marked this conversation as resolved.
Show resolved Hide resolved
</IonItem>
</IonList>
</IonContent>
Expand Down
3 changes: 2 additions & 1 deletion src/pages/About.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@
}

.about-info {
position: absolute;
position: relative;
margin-top: -10px;
border-radius: 10px;
background: var(--ion-background-color, #fff);
z-index: 2; // display rounded border above header image
}

.about-info h3 {
Expand Down