zelark / nano-id-cc

Nano ID collision calculator
https://zelark.github.io/nano-id-cc/
MIT License
45 stars 10 forks source link

Compress CSS #8

Closed ai closed 6 years ago

ai commented 6 years ago

We can minify CSS by csso and remove .hljs-* classes which we don’t use

view-source:https://zelark.github.io/nano-id-cc/

ghost commented 6 years ago

So, I cleaned up CSS from unneeded .hljs-whatever classes. Now I need to add CSSO to build process. Unfortunately, I can't just install CSSO thru Clojars - it isn't there. But I can use a plugin called lein-npm, which adds NPM support to Leiningen.

ghost commented 6 years ago

We can even use PostCSS to do CSS stuff, but CSSO should be enough for this project.

ai commented 6 years ago

We can use cssnano or any other CSS minifier

zelark commented 6 years ago

Sorry guys for a little delay.

We can use cssnano or any other CSS minifier

Yep, agree. We need something tiny.

I think there is a ClojureScript tool for that task. I'll check it on the weekend.

zelark commented 6 years ago

and remove .hljs-* classes which we don’t use

Hmm, they're used implicitly by highlight.js. A serialized light theme which I choosed is little different from default one, that why I put the classes in style.css.

UPD: sorry, a little misunderstanding, I got it. (-:

zelark commented 6 years ago

@mishaor, may you create a PR with cleaned CSS?

zelark commented 6 years ago

Within CLJS world I found lein-asset-minifier plugin for CSS compression.

ghost commented 6 years ago

@zelark I did an initial PR: #9