-
Notifications
You must be signed in to change notification settings - Fork 952
Typography component or way to use typography styles #1050
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
My current workaround far from ideal is to use just the css variables
|
This is definitely on our roadmap! I would recommend a plugin/loader for your build system that can turn a CSS file into a LitElement CSSResult, and use that to import import {style} from '@material/typography/dist/mdc.typography.css'; You can then include the Alternatively, you can include the raw CSS string into a |
Thanks for the quick response and the suggestion. Would it be another alternative to use a sass plugin and call the right mixin for the typography style (which mixin would that be)? |
Absolutely. You could transform Sass into your component's CSS. You'll want the @use "@material/typography";
.my-headline {
@include typography.typography(headline1);
} |
It would be awesome if this was implemented out of the box |
@asyncLiz would you mind providing working code or a tutorial on the steps to follow to be able to use Material typography in MWC based project (without SASS, just following the open-wc standard)? |
Any update on this feature? :) |
Is there a new strategy for typography in the new implementation yet? |
I don't believe so, not yet 😔 That might need to be a 1.1 feature |
New to github so forgive if this is bad form. I created a CSS file with the defaults and some global variables suggested on the demo site. Not sure if this will be helpful for others but it was for me so I'm sharing it here: https://github.com/thekvd/material-web-typography/ |
Fixes #1050 View the updated [typography docs](https://github.com/material-components/material-web/blob/main/docs/theming/typography.md#classes) for more info. PiperOrigin-RevId: 612905684
Fixes #1050 View the updated [typography docs](https://github.com/material-components/material-web/blob/main/docs/theming/typography.md#classes) for more info. PiperOrigin-RevId: 612905684
Long time coming, but this feature has been added. Check out our typography guide for usage docs! |
Is your feature request related to a problem? Please describe.
I'm trying to style individual elements with the material typography guidelines.
Describe the solution you'd like
Implement @material/mwc-typography component
Describe alternatives you've considered
I've tried to import
@material/typography/dist/mdc.typography.css
to use the css classes in my component like.mdc-typography--body1
, but I can't find an easy way or tool to include that style in my lit-html componentsThe text was updated successfully, but these errors were encountered: