Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

[RFC] Using "fitted" for spacing concerns #39

Closed
levithomason opened this issue Aug 1, 2018 · 0 comments
Closed

[RFC] Using "fitted" for spacing concerns #39

levithomason opened this issue Aug 1, 2018 · 0 comments
Labels
RFC vsts Paired with ticket in vsts
Projects

Comments

@levithomason
Copy link
Member

This RFC was raised in regard to the Icon's xSpacing prop, see #22.

Proposals

  1. Use start and end for all APIs that have left/right needs.
  2. Borrow the concept of fitted from Semantic UI React.

Reasoning

start/end

  1. There is CSS precedence to consider. before/after are used exclusively in CSS pseudo elements where additional content is inject before/after some existing content. Start/end are used in many CSS properties (alignments, grids, flexbox, etc) to specify a physical location of an element.

  2. The <Layout /> currently uses start and end terminology to avoid the RTL issue with left and right names. Introducing before/after would introduce conflicting terms for the same ideas. We should normalize the naming. This would make our API more consistent and more predictable.

  3. The terms start/end can be applied to more cases than before/after.

fitted

  1. We want to strive to use natural language in our APIs. This allows them to have room for flexibility, while leaving implementation out. It also makes the API more portable between developers, designers, and management. It is closer to the way we talk about UIs, making it easier to use and internalize.

  2. The prop fitted loosely describes the appearance or format of a component. This leaves us free to adjust any CSS values necessary for the component to appear fitted. Fitted might mean different things in the context of different components. An icon does not achieve "fitted" in the same way a menu item would.

Precedence

This concept is used in many SUIR components. It has useful precedence and vetting there. It sometimes affects padding, sometimes margin, sometimes it is applied to one side, or to both sides of an axis. The important thing is that there is only one high-level natural language term required, "fitted", to support all of these cases.

A few examples:

Icon

image

Menu

image

Vertical Menu

image

Divider

image

@pkumarie2011 pkumarie2011 added the vsts Paired with ticket in vsts label Oct 23, 2018
@levithomason levithomason added this to levithomason in Core Team Nov 16, 2018
@alinais alinais moved this from levithomason to Priority in Core Team Nov 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
RFC vsts Paired with ticket in vsts
Projects
No open projects
Core Team
  
Priority
Development

No branches or pull requests

3 participants