Skip to content

Commit

Permalink
Minify styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 committed Jun 24, 2024
1 parent c21dd8f commit b0d84b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions lib/src/client/color-switch/color-switch.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
border-radius: 50%;
border: 1px dashed gray;
cursor: pointer;
--size: 25px;
height: var(--size);
width: var(--size);
--s: 25px;
height: var(--s);
width: var(--s);
transition: all 0.3s ease-in-out 0s !important;
}

Expand All @@ -21,7 +21,7 @@
top: 0;
left: 0;
font-weight: 600;
font-size: calc(1 * var(--size) / 2);
font-size: calc(1 * var(--s) / 2);
display: flex;
align-items: center;
justify-content: center;
Expand All @@ -31,7 +31,7 @@
[data-csp="dark"] .s,
[data-csp="dark"] ~ .s,
[data-csp="dark"] ~ * .s {
box-shadow: calc(var(--size) / 4) calc(var(--size) / -4) calc(var(--size) / 8) inset #fff;
box-shadow: calc(var(--s) / 4) calc(var(--s) / -4) calc(var(--s) / 8) inset #fff;
border: none;
background: transparent;
animation: a linear 0.5s;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/client/color-switch/color-switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ export const ColorSwitch = ({
}: ColorSwitchProps) => {
const { toggleColorScheme } = useTheme(targetSelector);

const cls = [styles["color-switch"], className].join(" ");
const cls = [styles.s, className].join(" ");
return (
<button
className={cls}
data-testid="color-switch"
// skipcq: JS-0417
onClick={() => toggleColorScheme(skipSystem)}
// @ts-expect-error -- setting custom attribute
style={{ "--size": `${size}px` }}
style={{ "--s": `${size}px` }}
{...props}
/>
);
Expand Down

0 comments on commit b0d84b8

Please sign in to comment.