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

Add option to pass css file to the default template #15

Closed
MoOx opened this issue May 14, 2013 · 11 comments
Closed

Add option to pass css file to the default template #15

MoOx opened this issue May 14, 2013 · 11 comments

Comments

@MoOx
Copy link
Contributor

MoOx commented May 14, 2013

It would be great to have a option to pass a additional css to actually get the styles in the styleguide without having to duplicate default template.

@VinSpee
Copy link

VinSpee commented Nov 6, 2013

I think the thought here is that if you are using custom css, you will probably need custom markup.

@MoOx
Copy link
Contributor Author

MoOx commented Nov 6, 2013

How do you want to have a living styleguide, without styles themselves ?!
And if you want to use default template, you can't... Or I miss something.

@VinSpee
Copy link

VinSpee commented Nov 6, 2013

I see what you're saying now. I was misunderstanding.

@kud
Copy link

kud commented Nov 6, 2013

Please, namespace your own css @VinSpee in order not to override the css styleguide itself. ;)

Do something like dss-MyClass.

@MoOx
Copy link
Contributor Author

MoOx commented Nov 6, 2013

@kud about namespace #13

@kud
Copy link

kud commented Nov 6, 2013

YOU, ABOUT NAMESPACE.

johnlockedonttellmethaticantdo

@darcyclarke
Copy link
Member

@MoOx you are correct. "Sandboxing" the examples, with a reference to your generated stylesheet, seems to be the best way forward. The best way to sandbox, I can think of, is to use iframes and have those HTML documents link to your generated stylesheet (thus, separating the DSS Styleguide CSS and your project's CSS).

To do this we'll need to:

  • Allow setting a path, in the grunt config, to where your project's generated CSS lives
  • Generate HTML files for each example markup in some kind of sub folder (example: docs/markup)
  • Reference the project's generated CSS file in those generated HTML files
  • Use iframes instead of straight HTML markup in the default template

If you want to take a stab at this. That would be awesome.

@MoOx
Copy link
Contributor Author

MoOx commented Nov 6, 2013

Using BEM to scope everything seems a better idea for me.
The good point of not using iframe is that defaut html tags styles will fit the styles used from the actual CSS.
Don't you think ?

iframe seems overkill to me.

@VinSpee
Copy link

VinSpee commented Nov 6, 2013

I'm of the mind that you should not really need any style guide-specific CSS - you should be using the very styles you're outlining.

On Wed, Nov 6, 2013 at 3:48 PM, Maxime Thirouin notifications@github.com
wrote:

Using BEM to scope everything seems a better idea for me.
The good point of not using iframe is that defaut html tags styles will fit the styles used from the actual CSS.
Don't you think ?

iframe seems overkill to me.

Reply to this email directly or view it on GitHub:
#15 (comment)

@darcyclarke
Copy link
Member

I think the separation of concerns is important. Many times you create documentation that lives on it's own in it's own context. If you have your documentation's CSS mixed in with your project's CSS you're eventually going to run into issues of specificity (in my mind). But the library and templates are simple enough for you to change to your specific circumstance.

If you want to use your generated CSS file and not some specific styleguide CSS all you have to do is update the template (template/index.handlebars).

I think, eventually, iframes will be used to generate the examples.

@MoOx
Copy link
Contributor Author

MoOx commented Jul 29, 2015

Closing due to inactivity.

@MoOx MoOx closed this as completed Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants