Comments (14)
You're not wrong. There used to be a css-helpers package, but I'm not sure of @rtfeldman's long term plan. Maybe worth opening a PR for it?
from elm-css.
cc @rtfeldman this is a slight blocker 🎯
from elm-css.
This is fixed and can be closed, right?
from elm-css.
Possibly. I saw Css.Namespace
was removed again. What has it been replaced by?
from elm-css.
Nevermind, Css.Namespace
still appears to be missing..
from elm-css.
It was added by e825047 but removed again by ec9661d
from elm-css.
Css.Helpers.namspace
now has .rules
, which is the scoped version of the old Css.Namespace.namespace
from elm-css.
Is the example in the README supposed to work?
Detected errors in 1 module.
-- TYPE MISMATCH ------------------------------------------ ./src/Stylesheet.elm
`namespacer` is being used in an unexpected way.
42│ (stylesheet << namespacer.rules)
^^^^^^^^^^
Based on its definition, `namespacer` has this type:
{ class : ..., classList : ..., id : ..., name : ... }
But you are trying to use it as:
{ b | rules : ... }
from elm-css.
Not with 1.0.0 - I haven't pushed it yet since I'm trying to make sure that the next release will work for sure :)
from elm-css.
Ah I see, thanks!
from elm-css.
In 2.0.0, the solution is:
elm package install rtfeldman/elm-css-helpers
This contains Html.CssHelpers
and then the function of relevance is withNamespace:
(id, class, classList) = Html.CssHelpers.withNamespace "mynamespace"
This is necessary to use the CSS classes in a typesafe way.
Which is totally not obvious and can we please add this to the README?
from elm-css.
Yup! can you please make a PR for this?
from elm-css.
done: #110
from elm-css.
Thanks @jessitron! 🎉
from elm-css.
Related Issues (20)
- `Css.important` on `Css.batch` output only applies to last Css.Style
- Empty style node emitted if no styles HOT 1
- Cannot use elm-css with lamdera HOT 1
- Runtime type error when using CSS in an SVG element's attributes HOT 6
- Hash Collisions: FNV vs Murmur3 HOT 1
- `<span> > <style>` wrapping in elm-css 17 has unexpected side effect inside grid container HOT 3
- Different behavior for multiple`css` attributes between root of tree and children HOT 1
- Extra gap when using (display: flex) and (justify-content: space-between) HOT 3
- Css classes not rendering correctly
- 17.0.4 generated class name is not added when there's also a set class name HOT 15
- Elm HTML's non-optimized XSS warning bypassed by elm-css
- CSP nonce support (to be able to protect against XSS attacks) HOT 5
- Safari animations HOT 2
- Duplicate inline styles?
- Error in documentation? HOT 1
- Alternative Stylesheets
- Support for flex box gap HOT 1
- Class names are not escaped
- Rename `generalSiblings`
- Add animation timing function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elm-css.