Coder Social home page Coder Social logo

designtips / style-elements Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mdgriffith/style-elements

1.0 2.0 0.0 1.45 MB

Create styles that don't mysteriously break!

Home Page: http://package.elm-lang.org/packages/mdgriffith/style-elements/latest

License: BSD 3-Clause "New" or "Revised" License

Elm 9.45% JavaScript 3.55% HTML 86.67% Python 0.14% CSS 0.20%

style-elements's Introduction

The Style Elements Library!

Resources to get you started

Check out the intro guide to style-elements!

I also spoke about the basis of this library at Elm Europe, 2017

Join us on the #style-elements channel in the Elm Slack. Many style-element friends and I are there to answer questions and point you in the right direction. Don't be shy!

Building a new layout language

The Style Elements library is a new set of primitives for working with layout and style in Elm.

The most common goal when working with your view is usually to set or to adjust your layout.

HTML and CSS make this difficult 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.

Separating Layout and Style

The Style Elements library makes layout a first class idea, which makes working with style and layout a breeze.

It also makes refactoring your style feel similarly invincible as refactoring in Elm!

The main idea is that layout should live in your view, and your stylesheet should deal with all properties except those relating to layout, position, sizing, and spacing.

The Element module contains all the components that go in your view.

The Style module is the base for creating your stylesheet.

style-elements's People

Contributors

mdgriffith avatar brianhicks avatar littlestudent avatar lynn avatar mrmurphy avatar pzp1997 avatar ronanyeah avatar ivnsch avatar opsb avatar

Stargazers

Pray001 avatar

Watchers

Trey Brister avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.