Add component level stylesheet setting#477
Add component level stylesheet setting#477cjblomqvist wants to merge 1 commit intoderbyjs:masterfrom
Conversation
|
First of all, thanks for swift reply! Looking forward to you having increased attention to PRs, issues, etcetera! Regarding the PR: Yes, I heard from dadsn that there were some limitations doing it this way, and that using their fork of the derby-stylus repo you can achieve the same functionality (for stylus anyway). We can either leave it or close it for now and maybe I'll look into it a more robust solution inside the Derby core. If anyone is apt and have time to write failing tests that would be great. |
|
Your solution is perfect for css but it limits stylus. Let me explain. All is because of stylus global variables. In our clone of derby-stylus you can define a global var inside your main stylus file, for example app.loadStyles('index.styl'): and use the same var inside you components with default values: This is very handy to reuse components in different projects. But our clone has it's own limits. It assumes that you have only one app.loadStyles in your app and at the moment we have not found the better solution. |
Useful for defining styles within a component rather than having all in a separate global file/folder
Basically remove the need for the following plugin: https://github.com/BBWeb/d-component-styles