Dev Helpers
← Back

Give standalone buttons extra padding

Give standalone buttons extra padding with native CSS. The preview includes a small shared demo stylesheet.

Open this example in the interactive library

Source code

<style>
  .demo > button:not([disabled]) {
    padding-inline: 1.5rem;
  }
</style>
<div class="demo">
  <button type="button">Enabled</button>
  <button type="button" disabled>Disabled</button>
</div>