seb-oss / green

Green is an open-source design system built by SEB.
https://storybook.seb.io/
Apache License 2.0
33 stars 47 forks source link

Skeleton Loader: Mask-image #1056

Open patriklarssson opened 11 months ago

patriklarssson commented 11 months ago

Bug already reported?

For which framework/library you are reporting the bug

Chlorophyll

Component name

Skeleton loaders

Description

Need to add -webkit-mask-image to skeleton loaders since mask-image gives error "unknown property name"

mask-image: url(data.....) image

-webkit-mask-image: url(data...) image

Steps To Reproduce

add this code to react app

      <div className="skeleton-loader" aria-busy="true">
        Loading content
      </div>

Current Behaviour

Skeleton loader is displayed as a big block

Expected Behaviour

Should display correct shape for skeleton

vsjolander commented 11 months ago

Hello!

Checked the CSS we output and it's with correct prefixes:

Screenshot 2023-10-16 at 16 26 34

Are you building the SCSS yourself maybe you can use Autoprefixer to solve this? This is what we use when we build ours:

npx postcss path/to/file.css --use=autoprefixer -m -r

You can probably add this as a plugin/step in your bundler.