Skip to content

Commit

Permalink
Fix button icon jitter in safari and tauri
Browse files Browse the repository at this point in the history
  • Loading branch information
hojberg committed Sep 26, 2024
1 parent 2dca376 commit 1872183
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/css/ui/components/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ a.button:hover {
transform: translate(0, 0.1rem);
}

/* Fixes icon jitter on click in safari (and thus tauri) */
.button .icon {
will-change: transform;
}

/* -- Sizes ---------------------------------------------------------------- */

.button.small {
Expand Down
2 changes: 1 addition & 1 deletion storybook/stories/Stories/UI/Button.elm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ elements =
, B.icon UserClicked I.unisonMark
, B.iconThenLabel UserClicked I.unisonMark "Icon then Label"
, B.labelThenIcon UserClicked "Label then Icon" I.unisonMark
, B.iconThenLabelThenIcon UserClicked I.unisonMark "Icon then Label then Icon" I.unisonMark
, B.iconThenLabelThenIcon UserClicked I.unisonMark "Icon then Label then Icon" I.caretDown
]


Expand Down

0 comments on commit 1872183

Please sign in to comment.