All Projects → aerogo → scarlet

aerogo / scarlet

Licence: other
💋 Style sheets preprocessor similar to Stylus.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to scarlet

gulp-styl
Preprocess CSS with Styl
Stars: ✭ 21 (+61.54%)
Mutual labels:  preprocessor, css-preprocessor
userscript-proxy
HTTP proxy to inject scripts and stylesheets into existing sites.
Stars: ✭ 66 (+407.69%)
Mutual labels:  stylesheets
Boundary-Line-stylesheets
Cartographic stylesheets for Boundary-Line
Stars: ✭ 13 (+0%)
Mutual labels:  stylesheets
pre-class-accessors
No description or website provided.
Stars: ✭ 12 (-7.69%)
Mutual labels:  preprocessor
vrm pp
Small C++ preprocessor library
Stars: ✭ 12 (-7.69%)
Mutual labels:  preprocessor
markedpp
Preprocessor for markdown files
Stars: ✭ 21 (+61.54%)
Mutual labels:  preprocessor
QWidgetsCollection
A collection of customized Qt widgets
Stars: ✭ 28 (+115.38%)
Mutual labels:  stylesheets
qaffeine
Decaffeinate your JS-powered CSS stylesheets
Stars: ✭ 22 (+69.23%)
Mutual labels:  stylesheets
less-brunch
Adds LESS support to Brunch
Stars: ✭ 14 (+7.69%)
Mutual labels:  stylesheets
css-render
Generating CSS using JS with considerable flexibility and extensibility, at both server side and client side.
Stars: ✭ 137 (+953.85%)
Mutual labels:  preprocessor
ResetCSS
Reset CSS Stylesheet to reduce browser inconsistencies.
Stars: ✭ 17 (+30.77%)
Mutual labels:  stylesheets
preprocessor-loader
Bring the awesome "Conditional Compilation" to the Webpack, and more.
Stars: ✭ 32 (+146.15%)
Mutual labels:  preprocessor
atbuild
Use JavaScript to generate JavaScript
Stars: ✭ 26 (+100%)
Mutual labels:  preprocessor
typescript-babel-jest
DEPRECATED: ⚡ Typescript-babel jest preprocessor
Stars: ✭ 33 (+153.85%)
Mutual labels:  preprocessor
svelte-style-directive
A custom Svelte preprocessor to add support for style directive.
Stars: ✭ 19 (+46.15%)
Mutual labels:  preprocessor
lit
a little preprocessor for literate programming
Stars: ✭ 108 (+730.77%)
Mutual labels:  preprocessor
rollup-plugin-jscc
Conditional compilation and compile-time variable replacement for Rollup
Stars: ✭ 52 (+300%)
Mutual labels:  preprocessor
OS-Open-Zoomstack-Stylesheets
Cartographic Stylesheets for OS Open Zoomstack
Stars: ✭ 36 (+176.92%)
Mutual labels:  stylesheets
eraserface
dynamic polymorphism without inheritance
Stars: ✭ 31 (+138.46%)
Mutual labels:  preprocessor
smoothie
A deliciously scalable and adaptable stylesheet methodology 🍹
Stars: ✭ 27 (+107.69%)
Mutual labels:  stylesheets

scarlet

Godoc Report Tests Coverage Sponsor

Generates CSS from .scarlet files. Very similar to Stylus, but with higher compression.

Installation

go get -u github.com/aerogo/scarlet/...

CLI

If you're looking for the official compiler, please install pack.

The CLI tool included in this repo offers a check to see if your classes are referenced or not via scarlet -check.

Basic usage

body
	color black
	font-size 100%
	padding 1rem

State

a
	color blue

	:hover
		color red

Classes

a
	color blue

	// "active" elements inside a link
	.active
		color red

	// links that have the "active" class
	&.active
		color red

Multiple selectors

// All in one line
h1, h2, h3
	color orange

// Split over multiple lines
h4,
h5,
h6
	color purple

Variables

text-color = black
transition-speed = 200ms

body
	font-size 100%
	color text-color

a
	color blue
	transition color transition-speed ease
	
	:hover
		color red

Mixins

mixin horizontal
	display flex
	flex-direction row

mixin vertical
	display flex
	flex-direction column

Mixins can be used like this:

#sidebar
	vertical

Animations

animation rotate
	0%
		transform rotateZ(0)
	100%
		transform rotateZ(360deg)

animation pulse
	0%, 100%
		transform scale3D(0.4, 0.4, 0.4)
	50%
		transform scale3D(0.9, 0.9, 0.9)

Quick media queries

body
	vertical

> 800px
	body
		horizontal

Style

Please take a look at the style guidelines if you'd like to make a pull request.

Sponsors

Cedric Fung Scott Rayapoullé Eduard Urbach
Cedric Fung Scott Rayapoullé Eduard Urbach

Want to see your own name here?

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].