Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elm-athlete/athlete
💪 type safe elm-html-css-builder aka athlete
https://github.com/elm-athlete/athlete
elm frontend inline-css
Last synced: 2 months ago
JSON representation
💪 type safe elm-html-css-builder aka athlete
- Host: GitHub
- URL: https://github.com/elm-athlete/athlete
- Owner: elm-athlete
- License: bsd-3-clause
- Created: 2017-04-19T13:47:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-20T20:31:55.000Z (over 3 years ago)
- Last Synced: 2024-10-02T09:05:09.343Z (3 months ago)
- Topics: elm, frontend, inline-css
- Language: Elm
- Homepage: https://package.elm-lang.org/packages/elm-athlete/athlete/6.0.1/
- Size: 5.38 MB
- Stars: 62
- Watchers: 8
- Forks: 5
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - elm-athlete/athlete - 💪 type safe elm-html-css-builder aka athlete (Elm)
README
# `elm-html-css-builder` aka athlete
Type-safe CSS in elm is great, but it doesn't prevent a lot of invalid HTML
trees. For example, if you add width to a span, it won't have any effect. But
adding type-safety to CSS has no context of which HTML element you are in, so
it can't prevent you from expressing that.Similarly for flex-box, since a type-safe CSS library doesn't have context on
what the parent-child relationships need to be so it can't enforce that the
parent and children are set with the appropriate flex attributes.
But athlete can!No more changing properties and then checking the browser to see if anything changed!
athlete will give you compiler errors if you try to write CSS
that wouldn't end up having an effect, so it eliminates a whole class of impossible states!In other words, you won't have to look through your browser dev tools for messages like this anymore!
[Tweet](https://twitter.com/patrickbrosset/status/1118889616952766466)