Components: Button should be capitalized by default per MD spec

Created on 12 May 2017  路  9Comments  路  Source: angular/components

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;
}

All 9 comments

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.

What @donroyco said.

That makes sense. Thanks for the feedback.

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

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

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

PR would be great

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

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._

Was this page helpful?
0 / 5 - 0 ratings