Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/tame-readers-say.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@skeletonlabs/skeleton-common": patch
"@skeletonlabs/skeleton": patch
---

bugfix: Fix sticky hover styles on mobile devices and add active state

2 changes: 1 addition & 1 deletion packages/skeleton-common/src/components/accordion.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
width: 100%;
text-align: start;

&:hover {
@variant hover {
@apply preset-tonal-primary;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/skeleton-common/src/components/combobox.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

@apply btn btn-sm preset-tonal;

&:hover {
@variant hover {
@apply preset-filled-error-500;
}
}
Expand Down
10 changes: 5 additions & 5 deletions packages/skeleton-common/src/components/date-picker.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
&[data-part='preset-trigger'] {
@apply btn;

&:hover {
@variant hover {
@apply preset-tonal;
}
}
Expand Down Expand Up @@ -70,23 +70,23 @@
&[data-part='prev-trigger'] {
@apply btn-icon;

&:hover {
@variant hover {
@apply preset-tonal;
}
}

&[data-part='view-trigger'] {
@apply btn;

&:hover {
@variant hover {
@apply preset-tonal;
}
}

&[data-part='next-trigger'] {
@apply btn-icon;

&:hover {
@variant hover {
@apply preset-tonal;
}
}
Expand Down Expand Up @@ -118,7 +118,7 @@
justify-content: center;
align-items: center;

&:hover {
@variant hover {
@apply preset-tonal;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/skeleton-common/src/components/file-upload.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

@apply btn btn-sm preset-tonal;

&:hover {
@variant hover {
@apply preset-filled-error-500;
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/skeleton-common/src/components/floating-panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
&[data-part='stage-trigger'] {
@apply btn-icon;

&:hover {
@variant hover {
@apply preset-tonal;
}
}

&[data-part='close-trigger'] {
@apply btn-icon;

&:hover {
@variant hover {
@apply preset-tonal;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/skeleton-common/src/components/listbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
border-radius: var(--radius-base);
cursor: pointer;

&:hover {
@variant hover {
@apply preset-tonal;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/skeleton-common/src/components/tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
&[data-part='trigger'] {
@apply btn;

&:hover {
@variant hover {
@apply preset-tonal-primary;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/skeleton-common/src/components/tags-input.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
&[data-part='item-delete-trigger'] {
padding: --spacing(1) --spacing(2);

&:hover {
@variant hover {
@apply preset-tonal;
}
}
Expand All @@ -66,7 +66,7 @@

width: fit-content;

&:hover {
@variant hover {
@apply preset-filled-error-500;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/skeleton-common/src/components/toast.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
&[data-part='close-trigger'] {
@apply btn-icon;

&:hover {
@variant hover {
@apply preset-tonal;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/skeleton-common/src/components/toggle-group.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
width: --spacing(9);
aspect-ratio: 1;

&:hover {
@variant hover {
@apply preset-tonal;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/skeleton-common/src/components/tree-view.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
border-radius: var(--radius-base);
padding-inline-start: calc(var(--depth) * var(--spacing) * 6 + var(--spacing) * 4);

&:hover {
@variant hover {
@apply preset-tonal;
}

Expand All @@ -51,7 +51,7 @@
border-radius: var(--radius-base);
padding-inline-start: calc(var(--depth) * var(--spacing) * 6 - var(--spacing) * 2);

&:hover {
@variant hover {
@apply preset-tonal;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/skeleton/src/base/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/* IMPORTANT: this is useful for mobile accessibility. */
/* https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-tap-highlight-color */
/* -webkit-tap-highlight-color: rgba(128, 128, 128, 0.5); */
-webkit-tap-highlight-color: color-mix(in oklab, var(--color-primary-500) 30%, transparent);
-webkit-tap-highlight-color: color-mix(in oklab, var(--color-surface-50-950) 30%, transparent);
}

body {
Expand Down
20 changes: 16 additions & 4 deletions packages/skeleton/src/utilities/buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,20 @@
transition-timing-function: var(--default-transition-timing-function);
transition-duration: var(--default-transition-duration);

&:not(:disabled) {
&:hover {
@variant not-disabled {
@variant hover {
filter: brightness(125%);
@variant dark {
filter: brightness(75%);
}
}
}

@variant not-disabled {
@variant active {
scale: 95%;
}
}
}

@utility btn-icon {
Expand All @@ -77,14 +83,20 @@
height: var(--text-base);
padding: --spacing(2);

&:not(:disabled) {
&:hover {
@variant not-disabled {
@variant hover {
filter: brightness(125%);
@variant dark {
filter: brightness(75%);
}
}
}

@variant not-disabled {
@variant active {
scale: 95%;
}
}
}

/* Sizes --- */
Expand Down