1.7.0 • Published 4 years ago
@brandcolors/twitter v1.7.0
Introduction
Twitter Brand Colors.
Installation
npm install @brandcolors/twitterUsage
Styles
@use "@brandcolors/twitter/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/twitter";
.foo {
color: twitter.$primary;
// color: #1da1f2;
color: twitter.$primary-rgb;
// color: rgb(29, 161, 242);
}Custom Properties
@use "@brandcolors/twitter";
:root {
@include twitter.custom-properties(primary);
// --bc-twitter-primary: #1da1f2;
@include twitter.custom-properties(primary-rgb);
// --bc-twitter-primary-rgb: rgb(29, 161, 242);
}API
Variables
| Variable | Value |
|---|---|
$primary | Return hex value color. |
$primary-rgb | Return rgb color. |
Mixins
| Mixin | Description |
|---|---|
custom-properties($values...) | Create dedicated custom property. If the $values is empty, the mixin will create all styles by default. |