[jss] Support @page rules
See original GitHub issueCurrently using a @page
rule with JSS causes a warning. It still works fine, maybe it just needs to be added as a simple rule to https://github.com/cssinjs/jss/blob/master/src/plugins/rules.js#L9-L19 ?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Enables caching JSS rules
This plugin will cache JSS rules by comparing a reference from the object. It should be used as a first plugin, to bail...
Read more >Enables functions for dynamic styles - JSS
If you want dynamic behavior for your Style Sheet, you can use functions as a value which return the actual value or a...
Read more >Objects based styles syntax for declaring Style Sheets - JSS
Objects based styles syntax for declaring Style Sheets · Basic syntax · Media Queries · Keyframes Animation · Fallbacks · Font Face ·...
Read more >Setting up Content Security Policy with JSS
When loading the initial index page, the Content-Security-Policy header should now ... webpack config const config = { module: { rules: [ {...
Read more >JSS
JSS is an authoring tool for CSS which allows you to use JavaScript to describe styles in a declarative, conflict-free and reusable way....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kof are you sure that
@page
needs to be handled by plugin? After all, it’s part of basic CSS.If we could just add it to global rules here: https://github.com/cssinjs/jss/blob/9b7daa79aeea23422664a283a2557bb70b19b1b5/packages/jss/src/plugins/rules.js then it would be simple even for me to implement 😃
I was able to remove the warning by using the
GlobalStyles
component of MUI. I was using@page
to define page size and page margin while printing. I did something like this,You might not need to use
@page
inside the@media print
because@page
is only for printing. Documentation We can use theGlobalStyles
in our App container. Like this