What if you never had to write CSS again?
Go to file
2019-12-29 10:10:10 -05:00
.github/ISSUE_TEMPLATE typo in issue template 2019-06-12 22:15:38 -04:00
benchmarks better formatting for results benchmarks 2019-07-13 17:03:00 -04:00
cases move cases to resolved 2019-08-09 23:39:59 -04:00
examples a stylish new design toolkit 2018-08-28 19:41:08 -04:00
experiments remove console logs from cssom.js 2019-07-13 11:09:47 -04:00
notes benchmark notes 2019-07-13 19:37:47 -04:00
src resolves #138 - individual focus styles weren't being applied to text and multiline text input 2019-08-09 23:20:59 -04:00
tests add --ie and --edge options for locally running test on windows 2019-07-20 12:37:19 -04:00
.gitignore ignore bench results for now 2019-07-07 10:50:09 -04:00
CONTRIBUTING.md copy correction 2019-06-13 21:49:44 -04:00
CSS-LOOKUP.md a stylish new design toolkit 2018-08-28 19:41:08 -04:00
elm.json 1.1.5 - Dark Reader fix, focus styles to text inputs. fillPortion on El Children should be 100% 2019-08-10 08:49:32 -04:00
LICENSE a stylish new design toolkit 2018-08-28 19:41:08 -04:00
package.json publish to netlify when tests for sauce labs are run. 2019-07-06 14:03:07 -04:00
README.md update examples on readme so they compile 2019-12-29 10:10:10 -05:00
yarn.lock move package.json to root level so it can be shared by tests and benchmarks 2019-07-05 21:53:08 -04:00

Join the Elm UI Slack!

First, if you have a question about how to do something with the library, join #elm-ui on the Elm Slack! There are usually a number of people who are willing to help out, myself included.

Also, check out the talk that goes with the library, Building a Better Design Toolkit

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!

module Main exposing (..)

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.