Skip to content

JuliaGizmos/Tachyons.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

using Tachyons

tach = class"f1 b pa5 bg-navy yellow br4 fl"

dom"div"(
    tachyons_css,               # loads the stylesheet
    tach(dom"div"("Tachyons")), # adds the classes to div
)

A simple wrapper for tachyons css framework for good design with as little CSS as possible. For final control, use CSSUtil.

Usage

This module exports 2 things:

  1. tachyons_css -- a Scope object which loads the css file, place this somewhere in the DOM to load it.
  2. class"" -- a String macro which returns a function that adds the given classes to its input.

Here are the classes used in the example above:

  • f1 -- the font size f1 is the biggest and f6 is the smallest in this scale.
  • b -- bold font
  • pa5 -- pad with 5
  • bg-navy -- background color
  • yellow -- foreground color
  • br4 -- border radius
  • fl -- float

Check out the Tachyons docs to find ones you're looking for.

Build Coverage
Build Status codecov