1.5.0 • Published 4 years ago
@brandcolors/youtube v1.5.0
Introduction
YouTube Brand Colors.
Installation
npm install @brandcolors/youtubeUsage
Styles
@use "@brandcolors/youtube/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/youtube";
.foo {
color: youtube.$primary;
// color: #FF0000;
color: youtube.$primary-rgb;
// color: rgb(255, 0, 0);
}Custom Properties
@use "@brandcolors/youtube";
:root {
@include youtube.custom-properties(primary);
// --bc-youtube-primary: #FF0000;
@include youtube.custom-properties(primary-rgb);
// --bc-youtube-primary-rgb: rgb(255, 0, 0);
}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. |