1.2.0 • Published 3 years ago

shapla-color-system v1.2.0

Weekly downloads
48
License
MIT
Repository
github
Last release
3 years ago

Shapla Color System

The shapla color system can be used to create a color scheme that reflects your brand or style.

Table of contents

Installation

npm i shapla-color-system

Usage

Non-Sass customization

Only a very limited number of color customization features are supported for non-Sass clients. They are a set of CSS custom properties, and a set of CSS classes.

CSS Custom Properties

CSS Custom propertyDescription
--shapla-primaryThe theme primary color
--shapla-secondaryThe theme secondary color
--shapla-backgroundThe theme background color
--shapla-surfaceThe theme surface color
--shapla-on-primaryText color on top of a primary background
--shapla-on-secondaryText color on top of a secondary background
--shapla-on-surfaceText color on top of a surface background
--shapla-text-primaryUsed for most text
--shapla-text-secondaryUsed for text which is lower in the visual hierarchy
--shapla-text-hintUsed for text hints, such as those in text fields and labels
--shapla-text-disabledUsed for text in disabled components and content
--shapla-text-iconUsed for icons

CSS Classes

CSS ClassDescription
shapla-color--primarySets the text color to the theme primary color
shapla-color--primary-bgSets the background color to the theme primary color
shapla-color--on-primarySets the text color to the theme on-primary color
shapla-color--secondarySets the text color to the theme secondary color
shapla-color--secondary-bgSets the background color to the theme secondary color
shapla-color--on-secondarySets the text color to the theme on-secondary color
shapla-color--surfaceSets the surface color to the theme surface color
shapla-color--on-surfaceSets the text color to the theme on-surface color
shapla-color--backgroundSets the background color to the theme background color
shapla-color--text-primarySets text to a suitable color for TEXT_STYLE on top of light background