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.

Icon buttons have padding despite being plain

See original GitHub issue

I have Buttons without labels, just icons, that I’m rendering in a Box.

I want to reduce spacing between them but the plain prop doesn’t remove padding.

Note: could be similar to #1343

Expected Behavior

A Button with the prop of plain shouldn’t have padding, as per the docs:

plain Whether this is a plain button with no border or padding

Actual Behavior

The padding is still set
capture du 2019-03-08 15-49-58

URL, screen shot, or Codepen exhibiting the issue

Here’s a sandbox, navigate to Button

Your Environment

  • Grommet version: 2.5.5
  • Browser Name and version: Firefox
  • Operating System and version (desktop or mobile): Ubuntu desktop

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ShimiSuncommented, Mar 15, 2019

Fixed! thank you for filing the issue!

1reaction
oorestisimecommented, Mar 10, 2019

So the padding is applied here https://github.com/grommet/grommet/blob/master/src/js/components/Button/StyledButton.js#L121-L129

Here are some screenshots when not applying it and when we do (line height is always needed)

Screenshot_2019-03-10 Storybook(1) Screenshot_2019-03-10 Storybook

Don’t know if this is needed either

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I remove Flutter IconButton big padding?
Simply pass an empty BoxConstrains to the constraints property and a padding of zero. IconButton( padding: EdgeInsets.zero, ...
Read more >
Design better buttons. Everything you need to know to have…
Inside it we create another shape to house the icon. It should have a padding inside the larger shape, that's the same size...
Read more >
1160154 - [gtk3] Firefox: too much padding between icons in ...
The Gtk3 Firefox has way too much padding (space) between icons on the personal toolbar (and maybe elsewhere, in other toolbars), compared to...
Read more >
How to Prevent Users from Mistapping Icons - UX Movement
To prevent users from mistapping your icons, add extra padding. Check and see if you have enough padding by placing your finger over...
Read more >
Button - Graphite Design System
plain, Use for less important or less commonly used actions since they're less prominent ... As a general rule, a button should not...
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