GCSS is a pure Go CSS preprocessor. This is inspired by Sass and Stylus.
$base-font: Helvetica, sans-serif
$main-color: blue
body
font: 100% $base-font
color: $main-color
nav
ul
margin: 0
padding: 0
a
color: blue
&:hover
color: red
$border-radius($radius)
-webkit-border-radius: $radius
-moz-border-radius: $radius
-ms-border-radius: $radius
border-radius: $radius
.box
$border-radius(10px)
$ go get -u github.com/yosssi/gcss/...
$ gcss /path/to/gcss/file
You can compile a GCSS file from Go programs by invoking the gcss.Compile
function. Please see the GoDoc for the details.
pathc, errc := gcss.Compile("path_to_gcss_file")
select {
case path := <-pathc:
http.ServeFile(w, r, path)
case err := <-errc:
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
- vim-gcss - Vim syntax highlighting for GCSS