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

Flat button with inverted colors (accent color background) #7264

Closed
Ploppy3 opened this issue Sep 22, 2017 · 7 comments · Fixed by #7305
Closed

Flat button with inverted colors (accent color background) #7264

Ploppy3 opened this issue Sep 22, 2017 · 7 comments · Fixed by #7305
Assignees
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix needs: discussion Further discussion with the team is needed before proceeding

Comments

@Ploppy3
Copy link

Ploppy3 commented Sep 22, 2017

Bug, feature request, or proposal:

Feature request:
A flat button with accent background and its corresponding text color.

What are the steps to reproduce?

Basically it's a raised button without its shadow.
image

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

Those buttons are used in many situations since you are not supposed to use the raised button on elements with z-elevation.
They are already present in many (if not all) Google apps and websites with material design.
Even though they are not described in the official guidelines, the image you see is taken from the material guidelines website on the 'button' page.

@jelbourn
Copy link
Member

I don't follow. How is this not the existing color property?

@jelbourn jelbourn added discussion feature This issue represents a new feature or feature request rather than a bug or bug fix labels Sep 24, 2017
@Ploppy3
Copy link
Author

Ploppy3 commented Sep 24, 2017

Currently we have this:
image
I request a raised button without its shadow as stated in the feature request.

@Ploppy3
Copy link
Author

Ploppy3 commented Sep 24, 2017

One way to implement it: add a new directive [background-color] to the md-button.
What do you think?

@willshowell
Copy link
Contributor

While not idiomatic, it might be nice if adjusting the elevation of the raised button was a little easier. This,

<button mat-raised-button class="mat-elevation-z0">BUTTON</button>

doesn't work because both the default elevation and z0 styles have the same specificity. Of course it's simple to add this to your global stylesheet.

.my-flat-button.mat-raised-button {
  box-shadow: none;
}

@crisbeto crisbeto self-assigned this Sep 25, 2017
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 25, 2017
Allows for the consumer to set the button elevation through the elevation classes, similarly to the menu, card and expansion components.

Fixes angular#7264.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 26, 2017
Allows for the consumer to set the button elevation through the elevation classes, similarly to the menu, card and expansion components.

Fixes angular#7264.
andrewseguin pushed a commit that referenced this issue Sep 29, 2017
Allows for the consumer to set the button elevation through the elevation classes, similarly to the menu, card and expansion components.

Fixes #7264.
@Ploppy3
Copy link
Author

Ploppy3 commented Sep 29, 2017

@crisbeto Thank you very much.

@leocaseiro
Copy link
Contributor

That would be nice if we could also overwrite mat-button-toggle-group. Should I open a new issue or is very related to this one?

cc @crisbeto

crisbeto added a commit to crisbeto/material2 that referenced this issue Oct 19, 2017
Allows for consumer to specify a custom elevation on a `mat-button-toggle-group`.

Relates to angular#7264.
jelbourn pushed a commit that referenced this issue Nov 18, 2017
Allows for consumer to specify a custom elevation on a `mat-button-toggle-group`.

Relates to #7264.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 19, 2017
Allows for consumer to specify a custom elevation on a `mat-button-toggle-group`.

Relates to angular#7264.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 20, 2017
Allows for consumer to specify a custom elevation on a `mat-button-toggle-group`.

Relates to angular#7264.
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 18, 2018
Allows for consumer to specify a custom elevation on a `mat-button-toggle-group`.

Relates to angular#7264.
josephperrott pushed a commit that referenced this issue May 30, 2018
Allows for consumer to specify a custom elevation on a `mat-button-toggle-group`.

Relates to #7264.
andrewseguin pushed a commit that referenced this issue Jun 7, 2018
Allows for consumer to specify a custom elevation on a `mat-button-toggle-group`.

Relates to #7264.
josephperrott pushed a commit that referenced this issue Jun 26, 2018
Allows for consumer to specify a custom elevation on a `mat-button-toggle-group`.

Relates to #7264.
jelbourn pushed a commit that referenced this issue Aug 23, 2018
Allows for consumer to specify a custom elevation on a `mat-button-toggle-group`.

Relates to #7264.
jelbourn pushed a commit that referenced this issue Aug 25, 2018
Allows for consumer to specify a custom elevation on a `mat-button-toggle-group`.

Relates to #7264.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 26, 2018
Allows for consumer to specify a custom elevation on a `mat-button-toggle-group`.

Relates to angular#7264.
crisbeto added a commit to crisbeto/material2 that referenced this issue Oct 1, 2018
Allows for consumer to specify a custom elevation on a `mat-button-toggle-group`.

Relates to angular#7264.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 11, 2018
Allows for consumer to specify a custom elevation on a `mat-button-toggle-group`.

Relates to angular#7264.
@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 7, 2019
@mmalerba mmalerba added the needs: discussion Further discussion with the team is needed before proceeding label Mar 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix needs: discussion Further discussion with the team is needed before proceeding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants