Styling & Design

Containers and Spacing

Updated:

Shadow, border radius, and spacing constants that create consistent use of variables throughout the Tecton components.

Box Shadows

Container shadows should be utilized to convey height and distance to the user in relations to the main content (i.e., floor). This position should indicate an elevated state to identify either a clickable element, container or modal.

  • Variable Value
    --app-shadow-1
    Variable Name
  • Variable Value
    --app-shadow-2
    Variable Name
  • Variable Value
    --app-shadow-3
    Variable Name
  • Variable Value
    --app-shadow-4
    Variable Name
  • Variable Value
    --app-shadow-5
    Variable Name

Border Radii

  • Variable Value
    --app-border-radius-1
    Variable Name
  • Variable Value
    --app-border-radius-2
    Variable Name
  • Variable Value
    --app-border-radius-3
    Variable Name
  • Variable Value
    --app-border-radius-4
    Variable Name
  • Variable Value
    --app-border-radius-5
    Variable Name

Spacing

When applying spacing, hard-coding pixels for margins and padding has it's place. However when consistency and theme control are necessary, we have a new way of setting pixel spacing between elements called App Scale. These measurements are multipliers of a base unit with a default of 5px. So 2x would be 10px, 3x would be 15px, and so on. If the theme or application needs to modify the multiplier they can do so by changing the base unit from 5px to 4px for a tighter fit or 6px for a more airy fit in the white-space. This is also helpful for scoped spacing controls like tables where a Compact, Comfortable, or Airy feeling between table rows might help with legibility or scanning.

    Variable Value
    --app-scale-1x
    Variable Name
    Variable Value
    --app-scale-2x
    Variable Name
    Variable Value
    --app-scale-3x
    Variable Name
    Variable Value
    --app-scale-4x
    Variable Name
    Variable Value
    --app-scale-5x
    Variable Name
    Variable Value
    --app-scale-6x
    Variable Name
    Variable Value
    --app-scale-7x
    Variable Name
    Variable Value
    --app-scale-8x
    Variable Name
    Variable Value
    --app-scale-9x
    Variable Name
    Variable Value
    --app-scale-10x
    Variable Name
    Variable Value
    --app-scale-11x
    Variable Name
    Variable Value
    --app-scale-12x
    Variable Name