Skip to content

Design system - buttons restyling (icon-aware padding) [SCI-13284] - #9570

Open
boriskolarov wants to merge 1 commit into
scinote-eln:developfrom
boriskolarov:design-system-buttonsupdate-v2
Open

Design system - buttons restyling (icon-aware padding) [SCI-13284]#9570
boriskolarov wants to merge 1 commit into
scinote-eln:developfrom
boriskolarov:design-system-buttonsupdate-v2

Conversation

@boriskolarov

@boriskolarov boriskolarov commented Jul 14, 2026

Copy link
Copy Markdown

Implements the Core Design button spec from Figma for SCI-13284.

What changed

Restyles the design-system .btn so padding, radius and icon sizes follow the size scale (identical across all button types):

Size No-icon padding (both sides) Left-icon: left / right Icon Radius
Large 24 / 24 16 / 24 24px 8px
Medium 16 / 16 8 / 16 24px 8px
Small 12 / 12 8 / 12 20px 8px
X-Small 8 / 8 6 / 8 16px 8px
  • Border radius 4px → 8px across all sizes.
  • Size-specific icon sizes and gaps.
  • Icon-aware padding: a leading (left) icon reduces the left padding while the text side keeps the larger padding; no icon = symmetric. Implemented purely in CSS via :has(> .sn-icon:first-child) — no markup wrapper or side-class needed, since buttons only ever have a left icon or no icon.

Files

  • app/assets/stylesheets/tailwind/buttons.css
  • app/views/design_elements/_button.html.erb (showcase updated to match)

Notes

  • Preview at /design_elements (dev-only).
  • Right-side icons are intentionally out of scope; a right-only icon would need separate handling.

Jira: https://scinote.atlassian.net/browse/SCI-13284

Restyle design-system buttons to match the Core Design Figma spec:
- Border radius 4px -> 8px across all sizes
- Size-specific icon sizes (24/24/20/16 for lg/md/sm/xs)
- Size-specific gaps and horizontal padding
- Icon-aware padding: a leading (left) icon reduces the left padding
  while the text side keeps the larger padding; no icon = symmetric

Co-Authored-By: WOZCODE <contact@withwoz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant