@drawbotics/style-vars
v2.1.1
Published
Style variables used by Drawbotics across different projects
Downloads
41
Keywords
Readme
Drawbotics Style Vars
Style variables used by Drawbotics across different projects.
Installation
Install it as a any other npm
package:
$ npm i @drawbotics/style-vars
Usage
For JavaScript (with CSS in JS for example):
import sv from '@drawbotics/style-vars';
import { css } from 'emotion';
const styles = {
myComponent: css`
padding: calc(${sv.defaultPadding} * 0.5);
`,
};
For LESS
@import "~@drawbotics/style-vars/dist/vars.less";
:local(.myComponent) {
padding: @default-padding * 0.5;
}
For CSS
@import "~@drawbotics/style-vars/dist/vars.css";
:local(.myComponent) {
padding: calc(var(--default-padding) * 0.5);
}