emiloberg / markdown-styleguide-generator

Will search all your (s)css files for comments and generate a single page html styleguide
GNU General Public License v3.0
62 stars 19 forks source link

Not taking CSS after comment out #9

Open abinashmohanty opened 7 years ago

abinashmohanty commented 7 years ago

Hello,

First of all thank you so much for creating this beautiful style guide. I've followed your guidelines and created my own theme. However, I'm facing this issue with the CSS. Within a style guide comment, you have mentioned the css goes after */. Being said that I've implemented the following css code after the close css comment, but the styleguide doesn't reflect its css.

This is how it renders without CSS

Mark down style guide new theme

when I add the following css like this...

<a href="mailto:careers@ii5.com" class="btn btn-theme apply-mob-btn">Apply</a>

*/

.btn-theme { background-color: #00796B; font: 400 30px/32px robotoregular,sans-serif; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; -moz-box-shadow: #044f42 0 4px 0; -webkit-box-shadow: #044f42 0 4px 0; box-shadow: #044f42 0 4px 0; min-width: 398px; text-decoration:none; padding: 17px 15px; -webkit-transition: all .5s ease 0s; -moz-transition: all .5s ease 0s; -ms-transition: all .5s ease 0s; -o-transition: all .5s ease 0s; transition: all .5s ease 0s; }

Please let me know how to fix this! Thanks a ton.

emiloberg commented 7 years ago

Have you included the your CSS on the page where you're displaying the styleguide?

The Style guide generator does not include the CSS by default. And this is by design and what differs this styl eguide generator from others

As the README says:

The style guide simply contains HTML markup exemplifying how to use your css rules. That means that the generated html file will not do any good on it's own. Instead the intended use is to upload the generated HTML to your site where it will inherit your site's css. This also means that if you change your css - the look of the styleguide will change aswell. This way the styleguide will always tell the truth.

If you're using a CMS(-like system), this usually means that you create an article somewhere only accessible by developers and paste the content of the generated html file into that article (usually you'll have a source mode in your article editor).