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.

[Button]: bx--btn--sm do not make buttons smaller

See original GitHub issue

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

Describe in detail the issue you’re having.

Small buttons do not render as such on the last version of Carbon 9. They appear with regular size. The height/min-height is not correctly updated.

Is this issue related to a specific component?

Button

What did you expect to happen? What happened instead? What would you like to see changed?

The button size (height) should be smaller. Instead, the size stays the same.

What browser are you working in?

Chrome, Firefox, Edge

What version of the Carbon Design System are you using?

v9.91.0

Steps to reproduce the issue

  1. Create a regular Cabon button
  2. Add bx–btn–sm class

Please create a reduced test case

https://codepen.io/gian1200/pen/KLmovp

Additional information

  • The bug appeared between Carbon 9.81.5 and 9.81.6

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
emyarodcommented, May 22, 2019

@asudoh a stretch goal change but just missed a line

@gian1200 yes it should just be changing the line you identified

1reaction
gian1200commented, May 21, 2019

@asudoh, yes. Actually that’s the workaround I’ve been applying for the moment. I also wanted to do a PR to fix it on v9, but since I haven’t used any post or pre css processors (sass, scss) before, I wanted to read a little bit about them (as well as the contribution documentation) before doing it.

Although, if I understand the code correctly, it’s only necessary a 1 line change on branch v9, from height to min-height (?). https://github.com/carbon-design-system/carbon/blob/20735b4729ad6720eaa051946c6d8cec496bfe3b/src/components/button/_button.scss#L163

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make smaller button in bootstrap - css - Stack Overflow
The following example shows the code for different button sizes: ... You can easily make your buttons smaller using the height property in...
Read more >
How do I change a size button - WordPress.org
I would like advice on how I can resize the main button – “Quick view” I don't mean the content but purely the...
Read more >
OpenRoads Toolbar Button Size - Bentley Communities
The OpenRoads based toolbars display with large bars and small buttons (see below) as compared to the Microstation based bars. The OpenRoads ...
Read more >
Change the default grid size - AssistiveWare
Change the default grid size · Tap the Options Options icon button at the far right of the bottom toolbar · Go to...
Read more >
Skinning Buttons - LiveCode - Google Sites
Now your button will have the graphic on top of it. Adjusting Sizes. You may have to adjust the size of the ...
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