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

Button should be capitalized by default per MD spec #4496

Closed
michael-lang opened this issue May 12, 2017 · 9 comments
Closed

Button should be capitalized by default per MD spec #4496

michael-lang opened this issue May 12, 2017 · 9 comments

Comments

@michael-lang
Copy link

Bug, feature request, or proposal:

Button text should be in uppercase according to the material design spec. Should this rule be defaulted in the appropriate contexts in Angular Material?

What is the expected behavior?

https://material.io/guidelines/components/buttons.html#buttons-usage

Button text should be capitalized in languages that have capitalization. For other languages, colored text on flat buttons distinguishes them from normal text.

What is the current behavior?

text is not capitalized

What are the steps to reproduce?

Any button in any sample

What is the use-case or motivation for changing an existing behavior?

Default behavior should follow the spec

Which versions of Angular, Material, OS, browsers are affected?

current version

Is there anything else we should know?

Here's an option to make it work on forms, cards and dialogs and excludes buttons in menus:

form button, md-card button, md-dialog-container button  {
  //:not(md-menu-item)
  text-transform: uppercase;
}
@donroyco
Copy link
Contributor

No, it shouldn't be set by default. As @jelbourn mentioned in #2637:

We specifically do not use text-transform as it may have internationalization issues (changing the case may change the meaning of the text in some locales). If you always want to to capitalize the button text, you can add a global rule specific to your application.

@jelbourn
Copy link
Member

What @donroyco said.

@michael-lang
Copy link
Author

That makes sense. Thanks for the feedback.

@ccstevenson
Copy link

ccstevenson commented May 15, 2017

@donroyco @jelbourn The button used by md-snackbar (.mat-simple-snackbar-action) does text-transform: uppercase;. It sounds like this may be unintentional.

@jelbourn
Copy link
Member

@ccstevenson yes, that is unintentional and it should be removed.

@donroyco
Copy link
Contributor

@jelbourn Can I make a PR for this? Or create a new 'issue' and file a PR in that one...

@jelbourn
Copy link
Member

PR would be great

@donroyco
Copy link
Contributor

@ccstevenson @jelbourn PR on the way... #4567

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants