Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.

Commit

Permalink
better docs
Browse files Browse the repository at this point in the history
  • Loading branch information
justgage committed Oct 24, 2017
1 parent 48fd7af commit 96c0974
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
6 changes: 5 additions & 1 deletion examples/Main.elm → Main.elm
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
module Main exposing (..)

import Tachyons exposing (classes, tachyons)
import Tachyons.Classes exposing (f1, purple, pointer, b)
import Tachyons.Classes exposing (f1, purple, pointer)
import Html exposing (..)


{-|
This is just an example of how this works
-}
main : Html msg
main =
div [ classes [ f1, purple, pointer, Tachyons.Classes.b ] ]
[ tachyons.css
Expand Down
18 changes: 14 additions & 4 deletions Tachyons.elm
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,22 @@ classes stringList =
class (String.join " " stringList)


{-| [Tachyons 4.6.1](http://tachyons.io/)
{-| [Tachyons 4.7.3](http://tachyons.io/)
> _"Create fast loading, highly readable, and 100% responsive interfaces with as
> little css as possible."_
> also is an implementation of [functional CSS](https://marcelosomers.com/writing/rationalizing-functional-css/).
This basically includes an `<style>` tag containing the inline CSS code
for the tachyons version this library supports. Namely 4.7.3.
To use it just place it inside of a HTML tag like so:
div [] [ tachyons.css ]
If you want to use it from a CDN link rather than a `<style>` tag I would encourage you to
include the CDN link in your HTML like so:
<!-- NOTE: this is outside of Elm, inside of Elm it will cause a css flash -->
<link rel="stylesheet" href="https://unpkg.com/tachyons@4.7.3/css/tachyons.min.css"/>
then use the `Tachyons.Classes` as you normally would.
-}
tachyons : { css : Html msg }
tachyons =
Expand Down

0 comments on commit 96c0974

Please sign in to comment.