xobotyi / react-scrollbars-custom

The best React custom scrollbars component
https://xobotyi.github.io/react-scrollbars-custom/
MIT License
842 stars 75 forks source link

Stop requiring style-src 'unsafe-inline' CSP #472

Open kiliancs opened 1 year ago

kiliancs commented 1 year ago

Description

Addresses #469.

Setting the style attribute on an element violates stricter CSP and requires a policy of style-src 'unsafe-inline'. Setting each style in the style property of the element resolves this issue.

Use case

A safe application with a strict CSP. See https://codesandbox.io/s/autumn-fast-n5p48h?file=/public/index.html and #469 for more details.

Type of change

Checklist