What if you never had to write CSS again?
Go to file
Matthew Griffith 9db6dd0028
Merge pull request #117 from bburdette/multiline-value
add 'value' attrib with text for multiline.
2019-06-12 19:53:20 -04:00
.github/ISSUE_TEMPLATE Remove duplicated bug template 2018-09-04 10:11:18 -04:00
cases Reorganize tests for easier running. 2018-12-29 11:46:16 -05:00
examples a stylish new design toolkit 2018-08-28 19:41:08 -04:00
experiments Move workspace to separate area 2018-10-02 10:41:12 -04:00
notes Internationalization document 2018-12-29 11:48:08 -05:00
src Merge pull request #117 from bburdette/multiline-value 2019-06-12 19:53:20 -04:00
tests update results folder 2018-12-30 08:45:04 -05:00
.gitignore Automated Browser and App Testing 2018-12-30 08:44:26 -05:00
CHANGES-FROM-STYLE-ELEMENTS.md Change References to Area -> Region 2018-09-05 15:06:52 +02:00
CSS-LOOKUP.md a stylish new design toolkit 2018-08-28 19:41:08 -04:00
elm.json 1.1.0 - Font.variant and Input.labelHidden 2018-10-02 10:46:30 -04:00
LICENSE a stylish new design toolkit 2018-08-28 19:41:08 -04:00
README.md Link to Ellie 2018-09-03 13:35:27 -04:00

A New Language for Layout and Interface

CSS and HTML are actually quite difficult to use when you're trying to do the layout and styling of a web page.

This library is a complete alternative to HTML and CSS. Basically you can just write your app using this library and (mostly) never have to think about HTML and CSS again.

The high level goal of this library is to be a design toolkit that draws inspiration from the domains of design, layout, and typography, as opposed to drawing from the ideas as implemented in CSS and HTML.

This means:

  • Writing and designing your layout and view should be as simple and as fun as possible.
  • Many layout errors (like you'd run into using CSS) are just not possible to write in the first place!
  • Everything should just run fast.
  • Layout and style are explicit and easy to modify. CSS and HTML as tools for a layout language are hard to modify because there's no central place that represents your layout. You're generally forced to bounce back and forth between multiple definitions in multiple files in order to adjust layout, even though it's probably the most common thing you'll do.

Try this live example on Ellie!

import Element exposing (Element, el, text, row, alignRight, fill, width, rgb255, spacing, centerY, padding)
import Element.Background as Background
import Element.Border as Border
import Element.Font as Font


main = 
    Element.layout []
        myRowOfStuff

myRowOfStuff : Element msg
myRowOfStuff =
    row [ width fill, centerY, spacing 30 ]
        [ myElement
        , myElement
        , el [ alignRight ] myElement
        ]


myElement : Element msg
myElement =
    el
        [ Background.color (rgb255 240 0 245)
        , Font.color (rgb255 255 255 255)
        , Border.rounded 3
        , padding 30
        ]
        (text "stylish!")

History

The work is based off of a rewrite of the Style Elements library. A lot of that work was originally released under the Stylish Elephants project.