A style sheet consists of a list of rules.
Each rule consists of one or more selectors, and a declaration block.
| CSS rules | [] | Vector / array |
| CSS declarations | {} | Map / hash / dictionary / associative array |
p { margin: 0; } /* CSS */[:p {:margin 0}] ;; Clojure(Script)[:p, {margin: 0}] # Ruby["p", {margin: 0}] // JavaScripth1, h2, h3 { font-weight: none; }[:h1 :h2 :h3 {:font-weight "none"}]h1 a { font-weight: none; }[:h1 [:a {:font-weight "none"}]]h1, h2 { font-weight: normal; }
h1 strong, h1 b,
h2 strong, h2 b { font-weight: bold; }[:h1 :h2 {:font-weight "normal"}
[:strong :b {:font-weight "bold"}]]a { font-weight: normal; }
a:hover { font-weight: bold; }[:a
{:font-weight "normal"}
[:&:hover
{:font-weight "bold"}]]:host([flipped]) > ::content > *:last-child(require '[garden.selectors :as s])
(s/defselector *)
(s/defpseudoclass host [x] x)
(s/defpseudoelement content)
(s/> (host (s/attr :flipped))
content
(* s/last-child))h1 {
font-style: normal;
font-variant: normal;
font-weight: normal;
}[:h1 {"font-style" "normal"
:font-variant :normal
'font-weight 'normal}]h1 {
font-style: normal;
font-variant: normal;
font-weight: normal;
}[:h1 {:font {:style "normal"
:variant "normal"
:weight "normal"}}][:h1 {:font [["15px" "arial"] "sans-serif"]}][:h1 {:font "15px arial, sans-serif"}]h1 { font: 15px arial, sans-serif; }(require '[garden.arithmetic :refer [+ - * /]]
'[garden.color :as color]
'[garden.units :refer [px pt]])
(+ 1 (px 1) (pt 1))3.3333333332999997px(+ 1 (color/rgb 1 1 1) (color/hsl 1 1 1))#050505| Power | Power |
| Extensibility | Source maps |
| Namespaces | Ecosystem |
| Data |
| 1996 | JSSS (Netscape 4.0-4.8) CSS |
| 2006 2009 2010 |
Sass Less Stylus |
| 2013 | PostCSS Garden |