• Stars
    star
    487
  • Rank 86,955 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pure Go CSS Preprocessor

GCSS - Pure Go CSS Preprocessor

wercker status Build status Coverage Status GoDoc ![Gitter](https://badges.gitter.im/Join Chat.svg)

Overview

GCSS is a pure Go CSS preprocessor. This is inspired by Sass and Stylus.

Syntax

Variables

$base-font: Helvetica, sans-serif
$main-color: blue

body
  font: 100% $base-font
  color: $main-color

Nesting

nav
  ul
    margin: 0
    padding: 0

a
  color: blue
  &:hover
    color: red

Mixins

$border-radius($radius)
  -webkit-border-radius: $radius
  -moz-border-radius: $radius
  -ms-border-radius: $radius
  border-radius: $radius

.box
  $border-radius(10px)

Installation

$ go get -u github.com/yosssi/gcss/...

Compile from the Command-Line

$ gcss /path/to/gcss/file

or

$ cat /path/to/gcss/file | gcss > /path/to/css/file

Compile from Go programs

You can compile a GCSS file from Go programs by invoking the gcss.CompileFile function.

cssPath, err := gcss.CompileFile("path_to_gcss_file")

if err != nil {
	http.Error(w, err.Error(), http.StatusInternalServerError)
	return
}

http.ServeFile(w, r, cssPath)

You can invoke the gcss.Compile function instead of the gcss.CompileFile function. The gcss.Compile function takes io.Writer and io.Reader as a parameter, compiles the GCSS data which is read from the io.Reader and writes the result CSS data to the io.Writer. Please see the GoDoc for the details.

f, err := os.Open("path_to_gcss_file")

if err != nil {
	panic(err)
}

defer func() {
	if err := f.Close(); err != nil {
		panic(err)
	}
}()

n, err := gcss.Compile(os.Stdout, f)

Documentation

Syntax Highlightings

  • vim-gcss - Vim syntax highlighting for GCSS

More Repositories

1

ace

HTML template engine for Go
Go
829
star
2

gmq

Pure Go MQTT Client
Go
344
star
3

gohtml

HTML formatter for Go
Go
258
star
4

gold

[DEPRECATED]Template engine for Go
Go
145
star
5

goat

File watcher
Go
90
star
6

boltstore

Session store using Bolt
Go
87
star
7

go-fileserver

Go cached file server
Go
39
star
8

martini-acerender

Martini middleware/handler for parsing Ace templates and rendering HTML
Go
20
star
9

vim-ace

Vim syntax highlighting for Ace templates
Vim Script
16
star
10

galaxy

Simple web framework for Go
Go
15
star
11

rendergold

Martini middleware/handler for parsing Gold templates and rendering HTML
Go
15
star
12

go-voicetext

Go言語向けVoiceText Web APIクライアント
Go
14
star
13

koa-stylus

Stylus middleware for Koa
JavaScript
12
star
14

gocover

Go coverage profile HTML showing tool
Go
9
star
15

vim-gcss

Vim syntax highlighting for GCSS
Vim Script
6
star
16

goesjp

Go news website
Go
5
star
17

go-session-store-benchmarks

Go session store benchmarks
Go
5
star
18

gospritz

Spritz program in Golang
Go
5
star
19

ace-proxy

Proxy for the Ace template engine
Go
4
star
20

gologger

Logger in Go
Go
4
star
21

ace-tmbundle

Ace TextMate/Sublime Text Bundle
4
star
22

orgs.io

Wep application for organizing bookmarks
Go
3
star
23

goproject

Go project search engine
Go
3
star
24

vim-gold

Vim syntax highlighting for Gold templates
Vim Script
3
star
25

gold.yoss.si

Website about Gold
Go
3
star
26

docker-errbit

Dockerfile for Errbit
Shell
3
star
27

staticbin

Martini middleware/handler for serving static files from binary data
Go
3
star
28

go-perm

Permutation Generator in Go
Go
3
star
29

ip2domain

IP address to domain name converter
Java
3
star
30

docker-elasticsearch

Dockerfile for Elasticsearch
Shell
2
star
31

httprouter

Go
2
star
32

gogithub

GitHub API client in Golang
Go
2
star
33

xpress

Simple blogging service
Go
2
star
34

packer-errbit

Packer configuration file for Errbit
2
star
35

goes

Go news gatherer
Go
2
star
36

slides.yoss.si

Website showing slides
Go
2
star
37

dockerfile-dev

Dockerfile for general development
Shell
1
star
38

wercker-box-golang-latest

wercker box using the latest version of Go
1
star
39

ace.yoss.si

Website of Ace
Go
1
star
40

golang-study-slices

Golang study about slices
Go
1
star
41

t-rex-ai

T-Rex Game AI
JavaScript
1
star
42

goelasticsearch

Elasticsearch client in Golang
Go
1
star
43

chainer-vagrant

Vagrantfile for Chainer
Shell
1
star
44

vagrant-box-templates

Vagrant box templates
Shell
1
star
45

drone-test-custom-docker-image

Drone Test - Custom Docker Image
Go
1
star
46

go-stylus

Stylus caller in Go
Go
1
star
47

uguis

Twitter音声読み上げコマンドラインツール
Go
1
star
48

go-hpg

ホットペッパー Webサービス クライアント
Go
1
star
49

fluent-plugin-cloud-pubsub

fluent-plugin-cloud-pubsub
Ruby
1
star
50

golang-links-ja

Go言語に関するリンク
1
star
51

gocmd

Command utility functions in Go
Go
1
star
52

yoss.si

Website of Keiji Yoshida
Go
1
star
53

goc

Command which opens Go package documentation in a web browser
Go
1
star
54

golang-links

Links about Go
1
star
55

gold-tmbundle

Gold TextMate/Sublime Text Bundle
1
star
56

algorithms-in-go

Algorithms in Go
Go
1
star
57

html2ace

HTML to Ace Template Converter
1
star
58

gonhk

NHK API Client in Go
Go
1
star
59

cfnews

Articles relating to Crowdfunding
Go
1
star
60

talks

Talks
Go
1
star
61

goimpl

Go tool which searches structs which implement the specified interface
1
star
62

go-jsonp-callback-validator

JSONP callback validator
Go
1
star
63

i2d

IP address to domain name converter
Go
1
star
64

gofmtchk

Format check tool in Go
Go
1
star
65

gofmtall

Format tool in Go
Go
1
star
66

docker-go1.2-mongo2.4

Dockerfile for Go 1.2 and MongoDB 2.4
1
star
67

vagrantfiles

Vagrantfiles
Ruby
1
star
68

cfnewsjp

Articles relating to Crowdfunding
Go
1
star
69

xpress-packer-template

Xpress packer template
Shell
1
star
70

goutils

Utility functions in Go
Go
1
star