Hugo's New CSS Powers
33 points
5 hours ago
| 3 comments
| brycewray.com
| HN
brycewray
5 hours ago
[-]
Author here. This post arose out of a recent thread on the Hugo Discourse:

https://discourse.gohugo.io/t/hugo-v0-158-0-released/56868

reply
extra88
1 hour ago
[-]
BTW, there's a glitch in your code snippet syntax highlighting; in Light mode, the 'p' selector is remaining an unreadable yellow.
reply
brycewray
52 minutes ago
[-]
Whoops. Thanks for the catch. I was trying to trim down some of my CSS the other day, but inadvertently forgot to leave my `--cyan-700` variable. The yellow you saw was supposed to warn me, "Hey, you missed one!" but I apparently missed that one. :-/ Fixed.
reply
giancarlostoro
3 hours ago
[-]
Good call out from that thread is he's trying to get a small change in esbuild added to help with this as well.

https://github.com/evanw/esbuild/issues/4419

reply
brycewray
3 hours ago
[-]
Yes; hope that gets blessed. We shall see.
reply
imagetic
2 hours ago
[-]
Yeah Bryce!
reply
nine_k
4 hours ago
[-]
Nice! (But I must say that Zola has this built-in since forever.)
reply
brycewray
2 hours ago
[-]
For Sass, yes[0] --- as has Hugo[1]. Hugo's recently added `css.Build` function, based on esbuild, is for post-processing vanilla CSS.

[0]: https://www.getzola.org/documentation/content/sass/

[1]: https://github.com/gohugoio/hugo/releases/tag/v0.43 (July, 2018)

reply