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

improved atimport() for other at-rules. #1

merged 3 commits into from Sep 1, 2012


None yet
2 participants
Copy link

elegantcoder commented Aug 7, 2012

I found that the parser cannot parse '@charset' rule.

so, modified atimport() for other at-rules and renamed "atimport" to "atruleSimple"

"simple" in "atruleSimple" means "not for block rule". If you have better idea, change it please.

and added test case for @charset.

index.js Outdated
@@ -234,7 +237,8 @@ module.exports = function(css){
function atrule() {
return keyframes()
|| media()
|| atimport();
|| atruleSimple('import')
|| atruleSimple('charset')

This comment has been minimized.


tj Aug 7, 2012


personally I would rather just duplicate the above function and do atimport() || atcharset() etc

This comment has been minimized.


tj Aug 7, 2012


other than that looks good thanks!

This comment has been minimized.


elegantcoder Aug 8, 2012


i agree. i'm gonna change it.

tj added a commit that referenced this pull request Sep 1, 2012

Merge pull request #1 from elegantcoder/master
improved atimport() for other at-rules.

@tj tj merged commit b82bcc3 into reworkcss:master Sep 1, 2012

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