Skip to content
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

0 percentage keyframe keywords lose the % symbol when pretty print turned off #120

Closed
thedavidmeister opened this issue Oct 22, 2016 · 5 comments
Milestone

Comments

@thedavidmeister
Copy link

I tried:

[:0% :50% :100% {:transform "scale(0.0)"}]

Worked as expected with pretty print turned on.

With pretty print turned off, the % from 0% was dropped, which caused the whole keyframe rule to do nothing.

Using strings like "0%" instead of keywords like :0% seemed to workaround the issue.

@thedavidmeister
Copy link
Author

Wait, no, I was wrong. Strings do not help, the % for 0% is dropped always, breaking keyframes.

@noprompt
Copy link
Owner

@thedavidmeister Is that with or without minification? This seems eerily familiar to #116 that had a similar problem.

noprompt added a commit that referenced this issue Nov 29, 2016
Redesign

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
This patch rethinks the architecture of Garden in terms of well
defined boundaries between parsing and compiling. Instead of
directly compiling objects into CSS, Garden will first parse the objects
into a CSS AST which can then be consumed by the compiler. This
architecture is closer to what one might expect to find in a
programming language implementation setting. This new architecture
yields greater flexibility to introduce new features and semantics
while vastly simplifying the work of the compiler.

As a result many requested features and solutions to bugs have now
been either implemented, solved, or are now trivial to implement or
solve.

Changelog updates forthcoming.

Closes #31
Closes #109
Closes #115
Closes #116
Closes #119
Closes #120
Closes #121
@noprompt noprompt added this to the v2.0.0 milestone Nov 29, 2016
@livtanong
Copy link

Is using :from in place of :0% a sufficient workaround?

@luontola
Copy link
Contributor

I noticed a similar bug with colors.

(css {:pretty-print? false} [:.example {:color  (saturate "#ccc" -10)}])

This produces the following output, about which Chrome gives the error "Invalid property value".

.example{color:hsla(0,0,80%,1.0)}

The correct result would be:

.example{color:hsla(0,0%,80%,1.0)}

@noprompt
Copy link
Owner

I'd really appreciate any help resolving this issue. I'm really busy with work, family, and other things at the moment and it's hard for me to make time to solve this problem on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants