You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.
The benefits are that you don't need to come up with semantic names for breakpoints, keep them in sync between CSS and HBS/JS; and the styling concerns do not leak into HBS/JS.
The addon would parse resulting CSS for data-eq-* selectors at build time and expose them to the app as an importable JS module as a map of HTML classes to breakpoints. Element query components would then look up their breakpoints in the mapping and apply them automatically.
The approach I used to make that possible is quite questionable. It makes builds a bit slower and requires the mapping to be read with a separate HTTP request (because I failed to find a way to include it into the build -- when compiled CSS becomes available for parsing, JS is also compiled already).
Thus, I do not want to see it in any of my current projects. It felt quite appropriate in Ember Classic era, but it violates Octane and Embroider spirit.
But I find the goal to be quite noble and I wonder if there are Octane/Embroider-friendly ways of achieving it.
@chadian Please tell if you recognize the problem and if yes, share your thoughts.
The text was updated successfully, but these errors were encountered:
I've noticed a difference between the approaches of
ember-fill-up
and my oldember-element-query
.In
ember-fill-up
you need to define breakpoint values inpx
on HBS or JS level:You then use semantic names for breakpoint ranges in CSS:
This works, but what I don't like about this approach is that presentational concerns leak into HBS/JS realm where they don't belong.
Note that HBS/JS not only has to know breakpoint
px
values, but also be aware exactly which breakpoint ranges the CSS is gonna utilize.In
ember-element-query
you were able to usepx
breakpoint values directly on CSS level:Or with Sass:
The benefits are that you don't need to come up with semantic names for breakpoints, keep them in sync between CSS and HBS/JS; and the styling concerns do not leak into HBS/JS.
The addon would parse resulting CSS for
data-eq-*
selectors at build time and expose them to the app as an importable JS module as a map of HTML classes to breakpoints. Element query components would then look up their breakpoints in the mapping and apply them automatically.The approach I used to make that possible is quite questionable. It makes builds a bit slower and requires the mapping to be read with a separate HTTP request (because I failed to find a way to include it into the build -- when compiled CSS becomes available for parsing, JS is also compiled already).
Thus, I do not want to see it in any of my current projects. It felt quite appropriate in Ember Classic era, but it violates Octane and Embroider spirit.
But I find the goal to be quite noble and I wonder if there are Octane/Embroider-friendly ways of achieving it.
@chadian Please tell if you recognize the problem and if yes, share your thoughts.
The text was updated successfully, but these errors were encountered: