-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fixed Arbitrary fixes and nested block parsing. #8
base: master
Are you sure you want to change the base?
Conversation
I left out the `@` on media queries. This also adds a "resize" to limit the size of the structures, which can now be nested beyond two levels.
This allows the tests amended by yesodweb#7 and yesodweb#8 to pass again. * Simplified parsing of nested blocks. * Indefinite nesting levels are now allowed. * Some illegal CSS that was allowed by the old parser is now excluded (e.g. `@print { background: red; }`).
E.g. `@font-face`. Closes yesodweb#6.
It's still not right -- do not merge yet. |
The more I find out about CSS, the more I think this module needs to be rewritten.
Currently the parser gets this completely wrong:
The basic data structure A further issue; unless we hard-code things like
Looking carefully at the CSS syntax definition might yield better ideas. |
Testing with GHC 7.10 has its drawbacks!
This fixes PR #7 and #6.
The fix to
runtests.hs
adds the@
for media queries, and adds aresize
to limit the size of the structures, which can now be deeply nested. I also added more media query types.The fix to
Parse.hs
allows indefinitely nested blocks to be parsed, and fixes the problems noted in #6.