schnack icon indicating copy to clipboard operation
schnack copied to clipboard

styles / css

Open leviwheatcroft opened this issue 5 years ago • 2 comments

Is the embed code supposed to load css ? I can't see any css provided in the repo at all, does that mean we need to create custom css for our instance?

It's a bit awkward because of course, the comments won't load when viewed on localhost, I don't usually use a staging environment but it looks like I'll need one just for this.

leviwheatcroft avatar Jan 13 '19 23:01 leviwheatcroft

by design, schnack comes with no default css. after all, the goal is to make your comments look just like your site. but there's a schnack.css in the test folder that should help get you started https://github.com/schn4ck/schnack/blob/master/test/schnack.css

but maybe it's a nice idea to collect a few stylesheets in some sort of schnack-themes gallery.

gka avatar Jan 14 '19 15:01 gka

Oh sure, I didn't think to look in the test folder. In the end I stole comments.css from blog.webkid.io! I've tried a bunch of comment engines before settling on snack, which (rightly or wrongly) built up an expectation that some kind of styles would be provided out of the box, so much so that I thought something was wrong when there were no styles injected. It's fine if that's not your intention, but it couldn't hurt to mention something about it in the readme / docs. An example-styles folder in the repo might be nice, just so it's obvious where to find them, but then you'd probably want them to end up in the build directory because it would be handy to have them web-accessible. Having said that, it would be pretty easy to implement injecting styles into the page programatically with just a few lines of code. Yes the goal may be to make the comments look like the rest of your site, but IMO providing a starting point doesn't impede that goal, and it would make schnack more accessible to new consumers.

leviwheatcroft avatar Jan 14 '19 22:01 leviwheatcroft