Skip to content

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

Closed

Description

@Ploppy3

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.

Activity

  1. jelbourn commented on Sep 24, 2017

    @jelbourn
    Contributor

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

  2. added
    feature
    on Sep 24, 2017
  3. Ploppy3 commented on Sep 24, 2017

    @Ploppy3
    Author

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

  4. Ploppy3 commented on Sep 24, 2017

    @Ploppy3
    Author

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

  5. willshowell commented on Sep 25, 2017

    @willshowell
    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;
    }
  6. self-assigned this
    on Sep 25, 2017
  7. added 2 commits that reference this issue on Sep 25, 2017
    e377208
    ffa1089
  8. added a commit that references this issue on Sep 29, 2017
    92a868e
  9. Ploppy3 commented on Sep 29, 2017

    @Ploppy3
    Author

    @crisbeto Thank you very much.

  10. leocaseiro commented on Oct 19, 2017

    @leocaseiro
    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

  11. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    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.

  12. locked and limited conversation to collaborators on Sep 7, 2019
  13. added
    needs: discussion
    on Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureneeds: discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions