-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
garden.selectors broken in v2.0.0 #136
Comments
Yes. The selectors namespace has not been updated with an implementation of |
Does that mean, that it's not possible to express this selector at the moment? Or is there some other way around it? [(selector/& (selector/not :Vertically)) {:flex-direction :row}] |
@hkjels No but I think we can resolve this problem by defining and implementation of In (defrecord CSSSelector [selector]
garden.parse/IParse
(-parse [this]
[:css.selector/raw (css-selector this)])) and in (spec/def ::raw-selector
string?)
(spec/def ::selector
(spec/or ::simple-selector ::simple-selector
::compound-selector ::compound-selector
::complex-selector ::complex-selector
::raw-selector ::raw-selector)) ;; Support "raw" selectors but only at the top. We'd then need to add a method for it in This isn't a great solution though because it makes the resolution of nested selectors during the normalization process much more complex. A better alternative would be to parse the result of calling |
See #137 |
@hkjels Apologies for thinking out loud. The game plan will be to implement a parser for the CSS selector syntax and use that in the implementation of |
Hey, don't apologise. I love it! 👍 |
Whenever
selectors/&
is used an exception is raised:Assert failed: (vector? tagged-data)
Using the vector-form works
[:&:.foo]
, but as far as I know, that can not be combined with other selector-fns likeselectors/+
etc.The text was updated successfully, but these errors were encountered: