TLDR
In brief…
Measurement Units
- Think Relative Spacing and not fixed/absolute for most everything else other than base measurement unit.
- css
:root { --fontSize: 16px; }variable sets base measurement unit used in all other measurement calculations. Its applied inhtml { font-size: var(--font-size); } remunits are mainly used define rest of sizes in everything else based from the variable--font-size, sometimesemunits are sometimes used as well.- Example:
:root { --fontSize: 16px; --h1-size: 2.8rem; } html { font-size: var(--font-size); } h1 { font-size: var(--h1-size); } - There are three measurement spacing units: rim
--sp-rim, base--sp-base, feat--sp-feat. - Spacing units all are defined by
remin relation tohtml { font-size: var(--font-size); } - css
variablesandmedia queriesare how we control sizing and scaling. It’s all kept in the variables. - By using
calc()css function we modify spacing variables and keep everything relative and easily scalable. - Example:
element.style { padding-top: var(--sp-base); margin-bottom: calc( var(--sp-base) * 2.5 ); }
Css Grid
- Grid system becomes one column @ 799px.
- There is tablet(medium) columns setup. Those are set up as needed keeping the scaffolding Minimal
- The grid naming convention starts with
gss--and adds the column fr’s - Example:
gss--1-2-1is a three column grid sets up asgrid-template-columns: 1fr 2fr 1fr; gssautocreated an auto column grid that becomes 1fr @ 799pxgrid-gapcan also use the css measurement variables mentioned above:grid-gap: var(--sp-base);
Brand Colors
Css Production Theory
- Universal element styling and scaling happens In Css section:
- Unique element styling occurs in the rest of the sections
- Media queries per element are handled in the same group of css code. This encourages mobile first coding and builds up to the larger screens. It also becomes efficient as developers do not need to scroll up and down looking for media queries.