Color utilities

Modify the color of any elements tagetting font, background and/or border.

Loop gives you few colors by default to avoid overloading the CSS of rules you might not need.

palette: (
  'primary': #0ea7d6,
  'secondary': #959595,
),

// default settings
color: (
  font: (
    prefix: 'color',
    property: 'color',
    values: this('palette'),
  ),
  background: (
    prefix: 'bg',
    property: 'background-color',
    values: (
      _this('palette'),
      (
        'secondary': #f8f8f8,
      )
    )
  ),
  border: (
    property: 'border-color',
    values: (), // no border utilities
  ),
),

This is a text with the class .color-primary

This is a text with the class .color-secondary

this is a block with a the class .bg-primary

this is a block with a the class .bg-secondary

Set your preferences to the config.

$ooLoop: ooPipe(
  _add('palette', (
    'danger': #da3b3b // danger globally
  )),
  _add('color.font.values', (
    'warning': #ce8a0d,
  )),
  _add('color.background.values', (
    'danger': #f7c8c8, //override the danger value for background
  )),
  _set('color.border.values', this('palette')), //add global values
);

This is a text with the class .color-warning

This is a text with the class .color-danger

this is a block with a the class .bg-danger

this is a block with a the class .border-primary

this is a block with a the class .border-secondary

this is a block with a the class .border-danger


In manual mode add the mixin Color()


Make Utilities << >> Use Typography utilities