-
Notifications
You must be signed in to change notification settings - Fork 27
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
adjustable font size #141
Comments
At the moment many font sizes are hard-coded in pixels making it hard to change them all at the root level. Redefining the font size as a proportion of --- a/src/styles/material-dashboard/_variables.scss
+++ b/src/styles/material-dashboard/_variables.scss
// Font size
-$font-size-mini: 9px !default;
-$font-size-small: 12px !default;
-$font-size-default: 14px !default;
-$font-size-avatar-title: 18px !default;
-$font-size-alert-icon: 30px !default;
-$font-size-big: 36px !default;
-$font-size-small-tag: 65% !default;
+$font-size-mini: .64rem !default;
+$font-size-small: .88rem !default;
+$font-size-default: 1rem !default;
+$font-size-avatar-title: 1.29rem !default;
+$font-size-alert-icon: 2.14rem !default;
+$font-size-big: 2.57rem !default;
+$font-size-small-tag: .65rem !default;
$font-size-toolbar-title: $font-size-avatar-title;
-$font-size-toolbar-items: 20px !default;
+$font-size-toolbar-items: 1.43rem !default;
$font-size-h1: 3.3125rem;
$font-size-h2: 2.25rem !default;
$font-size-h3: 1.5625rem;
$font-size-h4: 1.125rem !default;
$font-size-h5: 1.0625rem !default;
-$font-size-h6: 0.75rem !default;
+$font-size-h6: .75rem !default;
$font-paragraph: $font-size-default !default;
$font-size-chart-label: .730rem !default; But sadly it doesn't work for everything, for example the controls of the table component appear to be hardcoded in pixels: Vuetify sets its variables in a stylus file. There is a I can't find anything in the Vuetify documentation along these lines and their accessibility pages don't mention font size. Questions:
|
Known issue in Vuetify: vuetifyjs/vuetify#3401
Probably I think. Our theme (Tom Creative's Material Dashboard) is doing that already for Toolbar/Footer (see
We can import the final distribution version with something like
I think it wasn't their main focus, but some users have already reported issues related to it: https://github.com/vuetifyjs/vuetify/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+accessibility Furthermore, if you look at their roadmap, the description of version 2.0 for Q2/2019 says:
So probably best that we don't change vuetify itself for a while. Or if need to work on this, I think your bullet item #1 could be done directly in their issue (they have a Help Wanted label there, and quite sure they'd be keen to receive a contribution from users). There will be a delay between 2.0 and the release of our theme (maybe we could re-assess the theme, and go with our own base components based on vuetify instead... though that'd be for another issue). |
Dammit! Kinda shocked accessability wasn't baked in to Vuetify from the start, it's pretty essential stuff. Thanks for this research @kinow! |
And just 6 hours ago, Vuetify 2.0 has been released: https://github.com/vuetifyjs/vuetify/releases/tag/v2.0.0
Now just need to wait for the update of the theme to use 2.0 too creativetimofficial/vuetify-material-dashboard#35 But for the font sizes we still need more work here (that could become a nice PR to vuetify later) 👍 |
Cool. Still a lot of |
Oh, nice! I only searched the changelog for typography/font, but didn't look at the code. Looks like it's a good start for what we need 🎉 |
I think this could be done before #9 , but pending #143 . We just need to find the right place to apply a With #143, we would probably use a cookie or local storage to store user settings. Then we can add a Downside is that that setting would persisted only in one browser for the user, but I don't think that is a major issue. |
Re-reading their docs today looks like they have added more on accessibility: https://vuetifyjs.com/en/customization/accessibility/, though not much on font sizes. |
Somewhat related to #9
Allow users to adjust font-size independently of theme.
We have users for which this is a major functional requirement.
The text was updated successfully, but these errors were encountered: