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

[Bug] @page css properties widths generating warnings #39

Closed
luchillo17 opened this issue Dec 20, 2016 · 9 comments
Closed

[Bug] @page css properties widths generating warnings #39

luchillo17 opened this issue Dec 20, 2016 · 9 comments

Comments

@luchillo17
Copy link

luchillo17 commented Dec 20, 2016

Using the following styles for printing in any css generates warnings, most likely because of the size units being mm, in or cm:

@page {
    width:44mm;
    size:8.5in 11in; 
    margin: 0.5cm !important;
};

Warning:

image

@gcarothers
Copy link

I think it's a bit worse than that. I'm pretty sure rework is just barfing on any page block :(

    WARNING in ./~/css-loader?{"importLoaders":3,"minimize":false,"sourceMap":true}!./~/postcss-loader!./~/resolve-url-loader!./~/sass-loader?{"sourceMap":true}!./sass/export.scss
      resolve-url-loader cannot operate: CSS error
      /home/gavin/LexMachina/src/deus_lex/winslow/sass/export.scss:14375:3: @page missing '}'
      at error (/home/gavin/LexMachina/src/deus_lex/winslow/node_modules/resolve-url-loader/node_modules/rework/node_modules/css/lib/parse/index.js:62:15)

@luchillo17
Copy link
Author

Interesting, in my case it just stop showing the warning if i leave the @page block empty, i'll check Thursday again.

@gcarothers
Copy link

gcarothers commented Dec 21, 2016

Yes, but that's 'cause uh, @pages handing inside of rework is badly broken. :( Starting a fork to see if this is fixable tomorrow.

@gcarothers
Copy link

https://github.com/reworkcss/css/blob/master/lib/parse/index.js#L413-L437 The defined expected syntax is just wrong

@gcarothers
Copy link

@Luchillo Ah, I think your error is the trailing ; after } for @page mine was a bit more fun.

reworkcss/css#105

@luchillo17
Copy link
Author

@gcarothers I've tested again, it is indeed the @page rule, i tough it was the units of size because when i deleted the content it worked fine, but i failed to realize that it worked probably because the sass-loader was ignoring empty rule sets.

@bholloway
Copy link
Owner

bholloway commented Jan 17, 2017

@Luchillo @gcarothers Let me know if your reworkcss MR is ever merged.

It looks like that project is stale, long term I think we will end up replacing reworkcss with something else.

@bholloway
Copy link
Owner

Finally replaced rework with postcss.

Please refer to #97 as version 3 may help any open issues.

@bholloway
Copy link
Owner

I'm going to close this ageing issue because we have a new version 3.0.0 which (e2e testing confirms) is much better.

Please open a fresh issue for any ongoing problems and link to this one as needed.

I'm not opposed to reopening this issue but certainly lets talk with respect to the new version.

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

3 participants