-
Notifications
You must be signed in to change notification settings - Fork 57
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
feature request: smarter CSS evals #42
Comments
What do you local changes look like? What sort of additional support from Skewer are you looking for? |
literally just as for the official support, i was thinking something like this....given the following CSS block:
if i eval that block, it should key off the selector
let's say the position relative was a bad idea. now i delete the line, and eval again. currently, i have to add a in my local change since i just clear everything, this works. but unfortunately, if i make a ton of changes to various places then previous evals that i want to keep get deleted as well. |
I like this idea. I just added
Since the user is part of the loop, I don't want the rules about updating the styles to get complicated. I'm afraid of users to evaluating some CSS and not getting what they're expecting because Skewer was trying to be smart about it. They shouldn't have to learn a complicated set of style-building rules to use the minor mode. The "append the style to the end of the page" is a simple rule that is easy to reason about on the fly. In your particular situation where you've got a lot of styles appended, perhaps you could clear out all the styles, as you've been doing, but also do a |
my particular situation is probably more unique than others, since i'm using stylus. i wrote a blog post about it here, where basically i have a stylus buffer, i compile it to CSS, and then run that through skewer. so in my situation, i don't really have a "master" css file to eval, because i'm always working on small stylus files localized to a particular part of the application i'm testing. and then once in a while, i would do a full reload of the full compiled CSS file to "reset" it. so for me, i need the granular "keying off selector", but i can see how it wouldn't be very useful for people who use straight CSS. implementing this properly would touch "the full stack" so the speak, so i figured maybe you would have a better idea of how it could be done. |
right now the eval works by continuing appending new style tags to the bottom of the document. unfortunately, this means that every new style that gets applied must also define a whole bunch of
none
,auto
,0
values to clear out any previous experiments.i have some local changes where i delete all style tags before adding one in the skewer.js file, but it'd be nice if this is supported officially, perhaps keyed to the CSS selector.
thanks.
The text was updated successfully, but these errors were encountered: