carteb / carte-blanche

An isolated development space with integrated fuzz testing for your components. See them individually, explore them in different states and quickly and confidently develop them.
https://www.youtube.com/watch?v=6g3-TQ6aaw8
MIT License
1.5k stars 47 forks source link

App CSS get loaded inside carte-blanche #366

Open FezVrasta opened 8 years ago

FezVrasta commented 8 years ago

I don't know if it's an expected behavior, but in my app.js I import some css files that are loaded in the global scope (styling for the HTML tags, body, etc).

When I open carte blanche and I visit the home page, everything is okay. When I open one of the components pages, the document.styl get loaded globally and changes the style of the whole Carte Blanche page.

To note that it doesn't happen with all the files I load, for example, only document.styl get loaded, even if I load at the exact same way even other two styl files. I would expect those files to be loaded inside the iframes, not inside the top page.

I don't understand why this is happening tho.

mxstbr commented 8 years ago

That's definitely a bug, those styles shouldn't be injected into the main CarteBlanche. Do you have some sample code by chance? How are you importing the files?

FezVrasta commented 8 years ago

I'm importing them with import './styles/document.styl

No code to show sorry :(

mxstbr commented 8 years ago

Alright, will try to replicate!

nikgraf commented 8 years ago

@FezVrasta how does your webpack config look like to load styl files?