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

Styles are not applied to previews #116

Closed
Couto opened this issue Mar 12, 2014 · 4 comments
Closed

Styles are not applied to previews #116

Couto opened this issue Mar 12, 2014 · 4 comments

Comments

@Couto
Copy link

Couto commented Mar 12, 2014

Assuming a stylus file like:

//# Buttons

// ## Base Styles

// Standard black
//
// ```
// <a class="btn" href="#/somewhereovertherainbow">Click here</a>
// ```
//
// ```
// <button class="btn">Click Here</button>
// ```

.btn
    height: 36px
    background-color: black
    border: none

and the command:

styledocco -n project --precompressor stylus --out 'docs/ui' app/styles/ui/

I get a pretty documentation website... but without any style in the previews like so:

no-styles

This process pollutes my stylus folder with the compiled css files, and if without deleting those files, I call the previous command again, I'll get the correct output in the generated website, but with every menu in duplicate like so:

with-styles
(yes the buttons are black... that's the correct style)

Am I doing something wrong or is this really a bug? I've read other issues like #25 but no luck at all...

@Couto
Copy link
Author

Couto commented Mar 12, 2014

I'm closing this issue, since I should blame the grunt-task instead of the styledocco itself.
Sorry for my mistake.

@Couto Couto closed this as completed Mar 12, 2014
@marrs
Copy link
Collaborator

marrs commented Mar 13, 2014

Thanks for raising the issue. Whether it's a fault with Styledocco or not, it's good to know what problem people are having.

Styledocco does a bad job of alerting users to incorrectly written comments (see #84 and #85). In this case it appears that you haven't indented the example HTML. Indenting the HTML should make Styledocco aware of it.

@Couto
Copy link
Author

Couto commented Mar 13, 2014

I can't physically test your point right now, so I'm just asking this out of curiosity (and a bit of lazyness I must add):

If I wrap my HTML example with the triple accent (```). Do I still have to indent the code?

If so... then yes my example is totally wrong, but I feel that should be a little more explicit in the documentation, since it referes that the users can use ``` just like in the github flavored markdown and that is not necessary on the latter.
ex:

<a class="btn" href="#/somewhereovertherainbow">Click here</a>

@marrs
Copy link
Collaborator

marrs commented Mar 30, 2014

If I wrap my HTML example with the triple accent (```). Do I still have to indent the code?

I'm pretty sure you do and I agree with you that this should be improved. I want Styledocco to be much more aware of the contents of comments and just do the right thing with them. Detecting HTML is an obvious first step. The plan for putting this in is in the milestone.

Unfortunately I've not been able to make time for Styledocco for a while, beyond curating the project so I can't promise to complete the work any time soon. Of course, your or anyone else are welcome to make contributions. If they do the job, they will probably be merged in.

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

2 participants