Skip to content

Commit 812537f

Browse files
annschmfranzke
andauthored
feat: input vars for guidelines 3.0 (#182)
feat: added custom vars for input Co-authored-by: Maximilian Franzke <[email protected]>
1 parent 7d89983 commit 812537f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

scripts/scss-scaling-generator.js

+17
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ const generateScaling = () => {
99
let allClasses = fileHeader;
1010

1111
const scaleTypeKey = ['regular', 'functional', 'expressive'];
12+
const inputCustomVars = {
13+
regular: {
14+
labelScale: 0.65,
15+
focusOpacity: 1
16+
},
17+
functional: {
18+
labelScale: 1,
19+
focusOpacity: 0
20+
},
21+
expressive: {
22+
labelScale: 0.55,
23+
focusOpacity: 1
24+
}
25+
};
1226

1327
for (const scale of scaleTypeKey) {
1428
allClasses += `
@@ -32,6 +46,9 @@ const generateScaling = () => {
3246
\t--db-spacing-responsive-lg: #{$db-spacing-responsive-${scale}-mobile-l};
3347
\t--db-spacing-responsive-xl: #{$db-spacing-responsive-${scale}-mobile-xl};
3448
49+
\t--db-input-label-scale: ${inputCustomVars[scale].labelScale};
50+
\t--db-input-focus-opacity: ${inputCustomVars[scale].focusOpacity};
51+
3552
\t@media only screen and (min-width: $db-screens-md) {
3653
\t\t--db-spacing-responsive-xs: #{$db-spacing-responsive-${scale}-tablet-xs};
3754
\t\t--db-spacing-responsive-sm: #{$db-spacing-responsive-${scale}-tablet-s};

0 commit comments

Comments
 (0)