CSS

Gloss makes use of PostCSS and postcss-preset-env to compile modern CSS into browser compatible CSS.

Breakpoints

Variable px
--xs 0px
--s 640px
--m 960px
--l 1200px
--xl 1600px

Typography

See the layout documentation to learn more about Gloss’s responsive type scale CSS classes.

Variable rem px
--global-xsmall-font-size .75rem 12px
--global-small-font-size .875rem 14px
--global-base-font-size 1rem 16px
--global-medium-font-size 1.25rem 20px
--global-large-font-size 1.5rem 24px
--global-xlarge-font-size 2rem 32px
--global-2xlarge-font-size 2.625rem 42px

Spacing

See the layout documentation to learn more about Gloss’s responsive spacing CSS classes.

Variable px
--global-xxsmall-spacing 4px
--global-xsmall-spacing 8px
--global-small-spacing 16px
--global-medium-spacing 32px
--global-large-spacing 48px
--global-xlarge-spacing 64px
--global-2xlarge-spacing 128px

Color

We encourage you to modify Gloss to fit your needs, and sometimes that means adjusting the colors. We’ve included tints in Gloss to make it easier to adjust colors in a way that’s consistent with other Gloss applications and with University of Utah Health’s brand guidelines.

Tints are colors mixed with different degrees of white. They offer flexibility and a greater range of color to draw attention to or indicate actions. (You’ll notice that we tint our secondary buttons to indicate a hover state, for example.)

  • Do use tints as accents in your custom components
  • Do make sure that color combinations meet WCAG 2.0 standards for contrast ratio. Use this tool to check combinations for compliance.
  • Do use tints sparingly
  • Don’t use tints to replace colors of existing components

Grayscale

Variable Hex Sample
--color-gray-0 #F4F4F5
--color-gray-1 #E9EAEA
--color-gray-2 #C5C5C6
--color-gray-3 #B3B2B3
--color-gray-4 #A8AAAC
--color-gray-5 #9F9FA0
--color-gray-6 #79797A
--color-gray-7 #535254
--color-gray-8 #414042
--color-gray-9 #212529

Primary

Variable Hex Sample
--color-primary #AC162C
--color-primary-0 #F7E7E9
--color-primary-1 #EED0D4
--color-primary-2 #E6B8BF
--color-primary-3 #DEA1AA
--color-primary-4 #D58A95
--color-primary-5 #CD7380
--color-primary-6 #C45B6A
--color-primary-7 #BC4456
--color-primary-8 #B42C40
--color-primary-9 #AC162C

Secondary

Variable Hex Sample
--color-secondary #4F868E
--color-secondary-0 #EDF3F3
--color-secondary-1 #DCE7E8
--color-secondary-2 #CADADD
--color-secondary-3 #B8CED2
--color-secondary-4 #A6C2C6
--color-secondary-5 #95B6BB
--color-secondary-6 #83AAAF
--color-secondary-7 #729EA4
--color-secondary-8 #609199
--color-secondary-9 #4F868E

Info

Variable Hex Sample
--color-info #7EDDD3
--color-info-0 #F2FCFB
--color-info-1 #E5F8F6
--color-info-2 #D8F5F2
--color-info-3 #CBF1ED
--color-info-4 #BEEEE9
--color-info-5 #B1EAE4
--color-info-6 #A4E7E0
--color-info-7 #97E3DB
--color-info-8 #8AE0D7
--color-info-9 #7EDDD3

Success

Variable Hex Sample
--color-success #6CC24A
--color-success-0 #F0F9EC
--color-success-1 #E1F3DB
--color-success-2 #D2EDC8
--color-success-3 #C4E7B6
--color-success-4 #B5E0A4
--color-success-5 #A6DA92
--color-success-6 #97D480
--color-success-7 #89CE6E
--color-success-8 #7AC85B
--color-success-9 #6CC24A

Warning

Variable Hex Sample
--color-warning #FFB500
--color-warning-0 #FFF8E5
--color-warning-1 #FFF0CC
--color-warning-2 #FFE9B2
--color-warning-3 #FFE199
--color-warning-4 #FFDA7F
--color-warning-5 #FFD266
--color-warning-6 #FFCB4C
--color-warning-7 #FFC333
--color-warning-8 #FFBC19
--color-warning-9 #FFB500

Danger

Variable Hex Sample
--color-danger #F68A33
--color-danger-0 #FEF3EA
--color-danger-1 #FDE8D6
--color-danger-2 #FCDCC1
--color-danger-3 #FBD0AD
--color-danger-4 #FAC498
--color-danger-5 #F9B984
--color-danger-6 #F8AD6F
--color-danger-7 #F7A15B
--color-danger-8 #F69547
--color-danger-9 #F68A33

Shadows

--global-small-box-shadow:    0 1px 1px rgba(0,0,0,0.09), 0 2px 2px rgba(0,0,0,0.1);
--global-medium-box-shadow:   0 1px 1px rgba(0,0,0,0.08), 0 2px 2px rgba(0,0,0,0.09), 0 4px 4px rgba(0,0,0,0.1);
--global-large-box-shadow:    0 1px 1px rgba(0,0,0,0.07), 0 2px 2px rgba(0,0,0,0.08), 0 4px 4px rgba(0,0,0,0.09), 0 8px 8px rgba(0,0,0,0.1);
--global-xlarge-box-shadow:   0 1px 1px rgba(0,0,0,0.06), 0 2px 2px rgba(0,0,0,0.07), 0 4px 4px rgba(0,0,0,0.08), 0 8px 8px rgba(0,0,0,0.09), 0 16px 16px rgba(0,0,0,0.1);