1.5.1 • Published 5 months ago

rtg-design-web v1.5.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

rtg-design-web

Web design system for my personal digital properties.

Additional design systems:

Using SASS in your project

Compile your project's CSS from the rtg-design-web source SASS.

@use 'rtg-design-web';

Using design tokens

Color

Use theme color tokens to produce a coherent user experience.

Color theme tokens

TokenValue
'background'#f9f9f9
'border'#e6e6e6
'text'#1b1b1b

Using color tokens

ContextUsageExample
functioncolor(token)color: color('text')

Font family

Font family tokens make it possible to set font family based on type or role.

Available fonts

The following font stacks are available.

TokenValue
'helvetica'Helvetica Neue, Helvetica, Roboto, Arial, sans-serif
'monospace'ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace
'system'-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji

Type-based theme tokens

TokenValue
'mono'monospace
'sans'helvetica
'serif'false

Role-based theme tokens

TokenValue
'alt'false
'body'helvetica
'code'monospace
'heading'helvetica
'ui'helvetica

Using font family tokens

ContextUsageExample
functionfamily(token)font-family: family('body')

Font weight

There are nine font weight theme tokens drawn from corresponding system tokens.

Font weight theme tokens

Font weight theme tokens use common weight names. Most projects will use only a few of these tokens, with the majority set to false.

TokenValue
'thin'false
'light'false
'normal'400
'medium'500
'semibold'false
'bold'700
'heavy'false

Using font weight tokens

ContextUsageExample
functionfont-weight(token)font-weight: font-weight('bold')

Line height

There are four role-based line height tokens to control the amount of space between lines in a block of text.

Line height theme tokens

TokenValue
ui1
heading1.25
body1.5
extended1.75

Using line height tokens

ContextUsageExample
functionline-height(token)line-height: line-height('body')

Type scale

The system type scale is based on 16px by default. Custom scale factors and base font sizes can be used to build unique exponential type scales.

Using type scale

ContextUsageExample
functiontype-scale(exponent[, scaling-factor, base])font-size: type-scale(2)

Spacing units

Spacing unit tokens are based on multiples of 8px.

Spacing unit tokens

Any numeric token is supported.

Using spacing unit tokens

ContextUsageExample
functionunits(token)padding: units(2)

Breakpoints

Breakpoint theme tokens

TokenValue
'phone'320px
'phone-lg'480px
'tablet'640px
'tablet-lg'880px
'desktop'1024px
'desktop-lg'1200px
'widescreen'1400px

Using breakpoint tokens

ContextUsageExample
functionbreakpoint(token)max-width: breakpoint('tablet')
mixinat-media(token)@include at-media('desktop')

Contributing

Versioning

This design system uses SemVer—Semantic Versioning. The three types of versions are:

  • Major versions contain breaking changes.
  • Minor versions add new features or deprecate existing features without breaking changes.
  • Patch versions fix defects or optimize existing features without breaking changes.
1.5.1

5 months ago

1.5.0

5 months ago

1.4.0

8 months ago

1.3.1

9 months ago

1.3.0

9 months ago

1.2.0

1 year ago

1.1.0

2 years ago

1.0.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago