Skip to content

Commit b972fe8

Browse files
author
Tiko
committed
if responsiveStyling is for size xs (mobile) add style for smaller than cutoff too
1 parent 77bf7cb commit b972fe8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

components/src/helpers/responsiveCss.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ export const responsiveValuesCSS = (
1111
Object.keys(value)[0],
1212
Object.values(value)[0].toString(),
1313
];
14+
15+
if(screenBreakpoint === "400"){
16+
return (mediaQueries + `${cssProp}: ${cssPropBreakpoint}${cssPropUnits};`);
17+
}
1418
return (mediaQueries + `
15-
@media screen and (${mediaQueryType}: ${screenBreakpoint}px) {
16-
${cssProp}: ${cssPropBreakpoint}${cssPropUnits};
17-
}
19+
@media screen and (${mediaQueryType}: ${screenBreakpoint}px) {
20+
${cssProp}: ${cssPropBreakpoint}${cssPropUnits};
21+
}
1822
`);
1923
}, "");
2024
return breakpointProps as string;

0 commit comments

Comments
 (0)