question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat(Button): `mat-inline` styles to match Material button w/ icon specs

See original GitHub issue

Feature Description

It would be nice to add some styles to a mat-icon within a mat-button so that it more closely matches the design specs found in Material Design. This could potentially take the form of a new attribute, mat-inline, placed on a mat-button.

This is an image of what I’m imagining a regular mat-button compared against a mat-inline mat-button would look like:

image

Sample Usage

<button mat-flat-button mat-inline color="accent">
  <mat-icon>account_circle</mat-icon>
  W/ Inline
</button>

Potential Implementation

.mat-button-base[mat-inline] {
    .mat-button-wrapper {
        display: flex;
        align-items: center;
    }
    .mat-icon {
        height: 18px;
        width: 18px;
        font-size: 18px;
        margin: 0 8px 0 -4px;
    }
}

[dir='rtl'] .mat-button-base[mat-inline] .mat-icon {
    margin: 0 -4px 0 8px;
}

Use Case

Whenever a user is creating an icon button, a user wouldn’t have to refer to the material documentation & have to add these styles manually within their projects.

It helps to ensure alignment with Material’s specs.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
angular-robot[bot]commented, Mar 14, 2022

This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we’ll move it to our consideration list.

You can find more details about the feature request process in our documentation.

0reactions
angular-automatic-lock-bot[bot]commented, Nov 28, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change size of mat-icon-button - Stack Overflow
You may want to increase the button size to something like 64. This answer works but doesn't scale up well, not for 64....
Read more >
Icon buttons - Material Design
Note: For buttons with both icons and text, use the mdc-button component. ... Material Design spec advises that touch targets should be at...
Read more >
Material Design Lite components
Material Design Lite (MDL) is a library of components for web developers based on Google's Material Design Philosophy: "A visual language for our...
Read more >
Buttons with icons - Leonardo Fernandes
We can use this to our advantage: by making each button be an inline-table , we can turn icons into a table-cell ,...
Read more >
Icon Button CSS Styling Guide
Icon + Text Button · aria-hidden="true" - allows assistive tech to skip the SVG since it's decorative and not providing any semantic value...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found