Skip to content

[Layout] Default spacing #8329

Answered by alex-page
aveline asked this question in General
Feb 13, 2023 · 3 comments · 14 replies
Discussion options

You must be logged in to vote

Default spacing zero

  • Similar to CSS. If there is no margin, gap, padding property then there isn't any spacing added.
  • React props added correlates to CSS code added
  • Understandable without reading documentation
    • <Inline>...</Inline> has no spacing
    • <Inline gap="2">...</Inline> has a gap of 2
  • All primitive components have the default of zero and it's faster to learn multiple parts of the system
  • All spacing is added with intention by the developers and designers. There isn't a perfect default spacing for many components.
  • Documentation is not necessary for learning what the default spacing value is (it's zero)
  • Cannot accidentally use the same value as the default as no spacing = no property

Replies: 3 comments 14 replies

Comment options

You must be logged in to vote
7 replies
@heyjoethomas
Comment options

@SeanyB
Comment options

@aaronccasanova
Comment options

@sophschneider
Comment options

@jesstelford
Comment options

Answer selected by aveline
Comment options

You must be logged in to vote
1 reply
@alex-page
Comment options

Comment options

You must be logged in to vote
6 replies
@jffortier
Comment options

@joeyfreund
Comment options

@alex-page
Comment options

@joeyfreund
Comment options

@jffortier
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment