Closed Anahkiasen closed 8 years ago
That's because the components are rendered in an iframe, which doesn't let any styles go through.
We currently don't support the files
option for the ReactPlugin, but the injectTags
option could be of help:
plugins: [
new CarteBlanche({
componentRoot: './src/Components',
plugins: [
new CarteBlancheReactPlugin({
injectTags: ['<link rel="stylesheet" href="path/to/custom.css" />']
});
]
})
]
What about the files
option of the React plugin itself, what does it do differently?
It doesn't work currently, due to the way the API is designed at the moment. That's high up on our list of bugs to fix!
Ok! Using injectTags
in the meantime, can confirm that solved my issue. Can close this if you want
Awesome, thanks! We're working on it!
I'm using the plugin as such:
When I look at
/dist/carte-blanche/index.html
I do see the<style>
tags with my CSS in it, in this case a basic Bootstrap:However when I actually go into Carte Blanche and look at a component using those styles, they're nowhere to be found:
Inspecting CB's
<head>
also shows a good bunch of<style>
tags but none containing my CSS. Same thing for the<head>
in the component's iframe