Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move CSS in a separate file to be CSP-compliant #6048

Merged
merged 3 commits into from Feb 8, 2019

Commits on Feb 6, 2019

  1. Move CSS in a separate file to be CSP-compliant

    In order to be compatible with any CSP, we need to prevent the automatic creation of the DOM 'style' element and offer our CSS as a separate file that can be manually loaded (`Chart.js` or `Chart.min.js`). Users can now opt-out the style injection using `Chart.platform.useExternalStylesheet = true` (note that the style sheet is now injected on the first chart creation).
    
    To prevent duplicating and maintaining the same CSS code at different places, move all these rules in `platform.dom.css` and write a minimal rollup plugin to inject that style as string in `platform.dom.js`. Additionally, this plugin extract the imported style in `./dist/Chart.js` and `./dist/Chart.min.js`.
    simonbrunel committed Feb 6, 2019
    Configuration menu
    Copy the full SHA
    0f3b844 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2019

  1. Configuration menu
    Copy the full SHA
    1a380ee View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    49f6c8c View commit details
    Browse the repository at this point in the history