-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Typography #205
Comments
can we add it per component or use typography.scss ? |
if this is fine I will update the remaining components |
To clarify: this issue is about making typography styles available for users to have in their own applications. I'm going to mark it as blocked since this will be influenced by how we approach theming as well. |
what's the implementation plan for typography? Are you guys planning on making this be a web component, or basically a stylesheet that will need to be imported/required into app components individually? I've been debating the "proper" approach to typography and how best to componentize re-usable styles that generally are "global" in nature but dont really need a web component to be executed. If you could outline some thoughts on your approach and the pros/cons thereof, that would be awesome! |
Current thinking is to have an |
with shadomDOM coming, and native in angular2, will that approach work? I've done a little bit of testing and it seems that this approach wont work since styles in the parent page wont bleed into a shadowDOM component... |
I stumbled across this today while looking for an answer to the following: For applications starting to use Angular Material 2 today, prior to the typography implementation, what is best interim short-term solution for styling application content that is not a angular-material Component? For example, is it best to grab one of the other Material implementations, and use it alongside, for styling other content? Any advice for which one fits in with the least trouble? |
Does it makes sense using typography from material 1 (no shadowDOM usage), untill this at least started? |
Will typography support theming? Like using different font for md-display and body copy. thanks |
@krigton it's blocked cause of theming, so I would say it will. |
We've started using a webpack loader to override styles, since CSS comes bundled in we can't actually change much, only colors. We also had hard time changing the font. This is the loader angular2-restyle-loader We use it to re-compile SCSS so we can set the variables. |
I have combined a few SCSS libraries, cleaned up the code, and compiled a SCSS typography implementation that accurately follows the material design specification. The typography is responsive based on the component's dimensions optimized for flexbox. The font-colors options enable a simple way to the meet web accessibility contrast guidelines considering the component's theme. Dynamic font imports are supported. Implementation options are flexible via SCSS mixins, custom css namespaces, and/or generated classes which make style specificity simple available globally, and at the component level. Maintenance and extensibility aspects were considered. I have never contributed to github before, and would appreciate any guidance. If development of this feature is underway I hope my Typography research may be helpful. |
@jelbourn
i.e.: |
I used the following css to override the font, while waiting for another solution: /*
* Override default material design fonts ($mat-font-family)
*/
$mat-font-family: 'Titillium Web',sans-serif;
.font-override { // body or wrapper class
.mat-button-toggle,
%mat-button-base,
.mat-button,
.mat-raised-button,
.mat-fab,
.mat-icon-button,
.mat-mini-fab,
.mat-card,
.mat-checkbox,
.mat-input-container,
.mat-list,
.mat-menu-item,
.mat-radio-button,
.mat-select,
.mat-list .mat-list-item .mat-list-item-content,
.mat-nav-list .mat-list-item .mat-list-item-content,
.mat-simple-snackbar,
.mat-tab-label,
.mat-slide-toggle-content,
.mat-toolbar,
.mat-tooltip {
font-family: $mat-font-family;
}
}
This can be improved I guess. |
#4162 might be the beginning of a implementation |
Closing this as this is now in master and will be part of the next release. |
@jelbourn that's really good news! Does @angular/material2 has an official release plan with any kind of ETAs? I didn't see |
Documentation for typography: https://material.angular.io/guide/typography |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
https://www.google.com/design/spec/style/typography.html
Combination of documentation and CSS.
The text was updated successfully, but these errors were encountered: