Skip to main content

Miscellanous tokens

There are a number of useful additional tokens you may want to use in your application.

direction

The primary document direction (LTR or RTL). Many CSS layout properties like flexbox and CSS grid automatically handle reflow depending on the document's primary direction. There are also CSS logical properties that can be used as well to apply localized margins, paddings, borders and positioning. Unfortunately, browser support for these properties is limited and there are still styling cases not covered by these properties (directional glyphs, transforms, etc). That is why teh Genesis web framework provides several mechanisms to apply direction-based styles.

Usage

direction: var(--direction);

disabledOpacity

This controls the opacity of disabled controls.

Usage

opacity: --disabled-opacity;

strokeWidth

Controls the width of the stroke of a component that has a stroke.

Usage

border: calc(var(--stroke-width) * 1px) solid #000;

focusStrokeWidth

This controls the width of the stroke of a component that has a stroke when it has document focus.

Usage

box-shadow: 0 0 0 calc(var(--focus-stroke-width) * 1px) #333;