mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 04:39:06 +02:00
55128f74c1
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.disableCSSInjection = 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`.
21 lines
288 B
CSS
21 lines
288 B
CSS
.content {
|
|
max-width: 640px;
|
|
margin: auto;
|
|
padding: 1rem;
|
|
}
|
|
|
|
.note {
|
|
font-family: sans-serif;
|
|
color: #5050a0;
|
|
line-height: 1.4;
|
|
margin-bottom: 1rem;
|
|
padding: 1rem;
|
|
}
|
|
|
|
code {
|
|
background-color: #f5f5ff;
|
|
border: 1px solid #d0d0fa;
|
|
border-radius: 4px;
|
|
padding: 0.05rem 0.25rem;
|
|
}
|