1.7.0 • Published 2 years ago

@brandcolors/facebook v1.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Brand Colors Facebook

Version Download License

Introduction

Facebook Brand Colors.

Installation

npm install @brandcolors/facebook

Usage

Styles

@use "@brandcolors/facebook/styles";

The styles will create all custom properties in CSS root. If you want this custom properties anywhere else, use the public mixin custom-properties.

Theming

@use "@brandcolors/facebook";

.foo {
    color: facebook.$primary;
    // color: #1877f2;
    color: facebook.$primary-rgb;
    // color: rgb(24, 119, 242);
}

Custom Properties

@use "@brandcolors/facebook";

:root {
    @include facebook.custom-properties(primary);
    // --bc-facebook-primary: #1877f2;
    @include facebook.custom-properties(primary-rgb);
    // --bc-facebook-primary-rgb: rgb(24, 119, 242);
}

API

Variables

VariableValue
$primaryReturn hex value color.
$primary-rgbReturn rgb color.

Mixins

MixinDescription
custom-properties($values...)Create dedicated custom property. If the $values is empty, the mixin will create all styles by default.