styledocco icon indicating copy to clipboard operation
styledocco copied to clipboard

Styles only in text/preview

Open stinoga opened this issue 10 years ago • 4 comments

After generating my styleguide with LESS, the outputted styles are only inside of a style tag with the text/preview type. This causes the examples in my styleguide to not have any styling.

stinoga avatar Feb 26 '14 21:02 stinoga

What happens if you compile the LESS to CSS first and then build the docs with that?

marrs avatar Mar 02 '14 21:03 marrs

Neither seem to work. Either way, I'd like to compile my styleguide from LESS, as I'd like to compile it from modules in a specific folder.

stinoga avatar Mar 13 '14 00:03 stinoga

I got the same problem. No iframe's to be seen.

EDIT: Found something... Styledocco 'crashes' fairly easily without giving any warnings when the comments are not perfect. Ex.:

/** Two asterisks in the beginning will make Styledocco crash */
/* Not having four spaces before iframe content like below, will also crash StyleDocco
<a class="btn">Button</a>
*/

EDIT2: Also, if you don't use the preprocessor option from StyleDocco, and just build your stylesheets with Less/Sass, the comments will be realigned, resulting in StyleDocco crashing.

peebeebee avatar Mar 28 '14 13:03 peebeebee

Thanks for raising these issues. If you're able to provide patches, that would be great. I'm unable to find the time to work on Styledocco at the moment but I am merging pull requests if they come with unit tests and don't break the build. I've refactored the code in develop so that the formatting of comments can be clearly documented/tested and separated from the rest of the process chain. I knew about the 4 spaces issue, but not about the other 2. I will raise separate tickets for them at some point.

marrs avatar May 20 '14 21:05 marrs