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.

[Fab] There's no padding for the small variant

See original GitHub issue

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Screen Shot 2022-03-09 at 9 02 50 AM

https://v4.mui.com/components/floating-action-button/#size

Expected behavior 🤔

No response

Steps to reproduce 🕹

Steps:

Context 🔦

No response

Your environment 🌎

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
danilo-lealcommented, Mar 11, 2022

@jharwinbarrozo Hey, just recapping the resolution: we should tackle this on the component level to have it fixed out-of-the-box but that would be a breaking change (not the moment for having it right now) - therefore we won’t do it soon.

However, you could do the fix yourself on your theme level as explained in https://github.com/mui/material-ui/issues/31381#issuecomment-1062642494! Thanks for letting us know, we’ll come back to this once v6 starts!

1reaction
siriwatknpcommented, Mar 9, 2022

If this issue is about no padding, I think we can close it because the padding is there:

https://mui.com/components/floating-action-button/#main-content Screen Shot 2565-03-09 at 14 44 22

If it is about unsymmetrical spacing with icon, I still think that it is not worth changing it right now because people can adjust it with theme API.

createTheme({
  components: {
    MuiFab: {
      styleOverrides: {
        root: ({ ownerState }) => ({
          ...ownerState.variant === 'extended' && ownerState.size === 'small' && {
            paddingRight: '12px', // or the value you like.
          }
        })
      }
    }
  }
})
Read more comments on GitHub >

github_iconTop Results From Across the Web

Adjust icon size of Floating action button (fab) - Stack Overflow
The FAB padding (the space between the icon and the background circle, ... is 56dp and there is another variation that is the...
Read more >
Buttons: floating action button - Material Design
A floating action button (FAB) represents the primary action of a screen. ... Updated FABs have a boxier style with smaller corner radius,...
Read more >
How to create FAB buttons - Figma tutorial - Captain Design
FAB button variants: FAB, small FAB, large FAB, and Extended FAB. 1 - Create a medium size FAB button. First, let's select our...
Read more >
FloatingActionButton class - material library - Dart API
... to disable a floating action button as there is no indication to the user that the button is disabled. ... class FabExample...
Read more >
Button API - Material UI - MUI
Rule name Global class Description root.MuiButton‑root Styles applied to the root element. fullWidth.MuiButton‑fullWidth Styles applied to the root element if fullWidth= . endIcon.MuiButton‑endIcon Styles applied to...
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