Skip to content

Commit

Permalink
Fix blurry appearance (#336)
Browse files Browse the repository at this point in the history
* Fix blurry appearance

* remove will change
  • Loading branch information
emilkowalski authored Feb 18, 2024
1 parent d39170f commit 85486f0
Showing 1 changed file with 10 additions and 40 deletions.
50 changes: 10 additions & 40 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,8 @@ html[dir='rtl'],
[data-sonner-toaster] {
position: fixed;
width: var(--width);
font-family:
ui-sans-serif,
system-ui,
-apple-system,
BlinkMacSystemFont,
Segoe UI,
Roboto,
Helvetica Neue,
Arial,
Noto Sans,
sans-serif,
Apple Color Emoji,
Segoe UI Emoji,
Segoe UI Symbol,
Noto Color Emoji;
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial,
Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
--gray1: hsl(0, 0%, 99%);
--gray2: hsl(0, 0%, 97.3%);
--gray3: hsl(0, 0%, 95.1%);
Expand Down Expand Up @@ -91,14 +78,10 @@ html[dir='rtl'],
position: absolute;
opacity: 0;
transform: var(--y);
filter: blur(0);
/* https://stackoverflow.com/questions/48124372/pointermove-event-not-working-with-touch-why-not */
touch-action: none;
will-change: transform, opacity, height;
transition:
transform 400ms,
opacity 400ms,
height 400ms,
box-shadow 200ms;
transition: transform 400ms, opacity 400ms, height 400ms, box-shadow 200ms;
box-sizing: border-box;
outline: none;
overflow-wrap: anywhere;
Expand All @@ -119,9 +102,7 @@ html[dir='rtl'],
}

[data-sonner-toast]:focus-visible {
box-shadow:
0px 4px 12px rgba(0, 0, 0, 0.1),
0 0 0 2px rgba(0, 0, 0, 0.2);
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(0, 0, 0, 0.2);
}

[data-sonner-toast][data-y-position='top'] {
Expand Down Expand Up @@ -200,9 +181,7 @@ html[dir='rtl'],
display: flex;
align-items: center;
flex-shrink: 0;
transition:
opacity 400ms,
box-shadow 200ms;
transition: opacity 400ms, box-shadow 200ms;
}

[data-sonner-toast] [data-button]:focus-visible {
Expand Down Expand Up @@ -241,16 +220,11 @@ html[dir='rtl'],
border-radius: 50%;
cursor: pointer;
z-index: 1;
transition:
opacity 100ms,
background 200ms,
border-color 200ms;
transition: opacity 100ms, background 200ms, border-color 200ms;
}

[data-sonner-toast] [data-close-button]:focus-visible {
box-shadow:
0px 4px 12px rgba(0, 0, 0, 0.1),
0 0 0 2px rgba(0, 0, 0, 0.2);
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(0, 0, 0, 0.2);
}

[data-sonner-toast] [data-disabled='true'] {
Expand Down Expand Up @@ -344,9 +318,7 @@ html[dir='rtl'],
[data-sonner-toast][data-removed='true'][data-front='false'][data-swipe-out='false'][data-expanded='false'] {
--y: translateY(40%);
opacity: 0;
transition:
transform 500ms,
opacity 200ms;
transition: transform 500ms, opacity 200ms;
}

/* Bump up the height to make sure hover state doesn't get set to false */
Expand Down Expand Up @@ -653,9 +625,7 @@ html[dir='rtl'],
left: 50%;
transform: translate(-50%, -50%);
transform-origin: center;
transition:
opacity 200ms,
transform 200ms;
transition: opacity 200ms, transform 200ms;
}

.sonner-loader[data-visible='false'] {
Expand Down

0 comments on commit 85486f0

Please sign in to comment.