https://github.com/powernoodle/cljc-normalize
Clojure library that supplies normalize.css via Garden
https://github.com/powernoodle/cljc-normalize
clojure-library css garden
Last synced: 23 days ago
JSON representation
Clojure library that supplies normalize.css via Garden
- Host: GitHub
- URL: https://github.com/powernoodle/cljc-normalize
- Owner: powernoodle
- License: mit
- Created: 2015-10-05T06:55:43.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-05-21T20:12:47.000Z (almost 7 years ago)
- Last Synced: 2025-12-31T08:41:47.152Z (3 months ago)
- Topics: clojure-library, css, garden
- Language: Clojure
- Size: 26.4 KB
- Stars: 6
- Watchers: 6
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# normalize
A Clojure library that ports
[normalize.css](http://necolas.github.io/normalize.css/) to
[Garden](https://github.com/noprompt/garden).
## Usage
Add the following dependency to your project.clj file:
```
[com.powernoodle/normalize "8.0.1"]
```
## Example
To use with Garden just include the normalize css rules in your apps
styles list before your other styles and compile normally with Garden.
```clojure
(ns example
(:require [normalize.core :refer [normalize]]))
(def app-styles
[normalize
[:a {:color "red"}]
[:span {:text-transform "uppercase"}]])
```
You can also consume the raw css without Garden.
This example contains an `index` function that will generate HTML
including an internal `` tag containing the normalize
styles. Alternatively, you can choose to render this content to an
external file.
```clojure
(ns example
(:require [hiccup.page :refer [html5]]
[normalize.core :refer [normalize-css]]))
(defn index
[]
(html5 {:lang "en"}
[:head
[:title "Hello World"]
[:style normalize-css]]
[:body
[:h1 "hello world!"]]))
```