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

Include images (sprites) in Styledocco's output #131

Open
paulwellnerbou opened this issue Jul 2, 2015 · 2 comments
Open

Include images (sprites) in Styledocco's output #131

paulwellnerbou opened this issue Jul 2, 2015 · 2 comments

Comments

@paulwellnerbou
Copy link

I am working in a big, grown project with hells of CSS, trying to introduce SCSS/SASS and Styledocco there step for step.

For the examples of the output styledocco gives me (we are using maven and grunt), I include generated sprite css files (which works fine with the include option). Is there any way to include the images the CSS is relying on as well?

@paulwellnerbou
Copy link
Author

I found a way to make this work... at least in chrome.

  1. I use a copy task to copy the image directories into the directory where the styledocco output is saved
  2. I start a local browser (using grunt server, but any will do), so that the absolute paths of the css backgrounds are correct.

Unfortunately this is working in Chrome, but does not work in Firefox. It seems to have something to do with the preview iframe URL. In Firefox there is "data:text/html;...." (which generates a URL like chrome://browser/... for images referenced in CSS), in Chrome the iframe URL is the local URL with an anchor.

@paulwellnerbou
Copy link
Author

I created a test project showing this problem: https://github.com/paulwellnerbou/styledocco-test-project

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

1 participant