Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: variables generation #334

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"serve": "vite preview",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"build-tokens": "token-transformer ./tokens/tokens.json transformed-tokens/tokens.json && style-dictionary build --config sd.config.json",
"lint:js": "eslint '**/*.{vue,ts}'",
"lint:js:fix": "eslint --fix '**/*.{vue,ts,html}'",
"lint:style": "stylelint '**/*.{css,scss,vue}'",
Expand Down Expand Up @@ -83,8 +84,10 @@
"rollup-plugin-vue": "^6.0.0",
"sass": "^1.51.0",
"sass-loader": "^12.6.0",
"style-dictionary": "^3.7.1",
"style-loader": "^3.3.1",
"stylelint": "^14.8.2",
"token-transformer": "^0.0.25",
"typescript": "^4.6.4",
"vite": "^2.9.8",
"vite-plugin-dts": "^1.1.1",
Expand Down
15 changes: 15 additions & 0 deletions sd.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
SeregaBB marked this conversation as resolved.
Show resolved Hide resolved
"source": ["transformed-tokens/**/*.json"],
"platforms": {
"scss": {
"transformGroup": "scss",
"buildPath": "src/",
"files": [
{
"destination": "token_variables.scss",
SeregaBB marked this conversation as resolved.
Show resolved Hide resolved
"format": "scss/map-deep"
}
]
}
}
}
6 changes: 4 additions & 2 deletions src/qComponents/QInput/src/q-input.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../../vars';

.q-input {
--field-color-base: var(--color-primary-black);
--field-color-placeholder: rgb(var(--color-rgb-gray) / 32%);
Expand Down Expand Up @@ -37,11 +39,11 @@
font-size: var(--font-size-base);
font-weight: var(--font-weight-base);
line-height: var(--line-height-base);
color: var(--field-color-base);
color: $input-default-text-color;
background-color: var(--field-background-color-base);
border: none;
border-radius: var(--border-radius-base);
box-shadow: var(--field-box-shadow-base);
box-shadow: create-shadow($tokens, 'input', 'default', 'dropShadow');
appearance: textfield;

&::-webkit-outer-spin-button,
Expand Down
Loading