svelte-toasts icon indicating copy to clipboard operation
svelte-toasts copied to clipboard

Transparency makes toast text unreadable

Open tv42 opened this issue 3 years ago • 3 comments

This is easy to demonstrate using https://mzohaibqc.github.io/svelte-toasts/

Select light theme. Adjust window / text size so that theme etc selection comes close to right edge of window. Click "Show Toast" enough times to make toasts overlap the radio buttons.

image

tv42 avatar Feb 08 '22 22:02 tv42

Looks like you're using transparency to lighten a color: rgba(225, 29, 72, 0.2) Might I suggest rgb(249, 210, 218) instead? And the same for all the other uses.

tv42 avatar Feb 08 '22 22:02 tv42

Workaround:

<ToastContainer placement="bottom-right" let:data>
  <!--
    Workaround unreadable transparency
    https://github.com/mzohaibqc/svelte-toasts/issues/7
  -->
  <div style="background-color: white">
    <FlatToast {data} />
  </div>
</ToastContainer>

tv42 avatar Feb 09 '22 20:02 tv42

The workaround works fine, thanks! :) But it would be better to have an extra 'opacity' property for this.

dmoebius avatar May 26 '23 12:05 dmoebius