Comments (4)
I have the same problem and the issue opened for 29 days, anyone track it?
from critters.
A related Bug Report was opened #20975. It was Closed with the note that further tracking of that Bug would be done along with #20760.
from critters.
This should be fixed by #80 or #82.
from critters.
I can confirm this is fixed in [email protected]
+:
import Critters from 'critters';
const critters = new Critters();
critters.readFile = f => assets[f];
const assets = {
'/x.css': `
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
.foo{ color:red; }
`
};
const html = await critters.process(`<div class="foo">hi</div><link rel="stylesheet" href="/x.css">`);
console.log(html);
"... <div class="foo">hi</div><style>@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');.foo{color:red}</style> ..."
from critters.
Related Issues (20)
- Unable to locate stylesheet HOT 4
- Branching webpack versions
- `pruneSource: true` not pruning files HOT 1
- Non-critical rules are erased from inline styles HOT 6
- Local font source is not recognized as valid
- relative urls within css
- Allow attributes to be set on generated style tag for CSP
- How to use critters in next.js v13 HOT 2
- critters de-encodes html entities HOT 1
- Parse include/exclude markers with @preserve or /*! hints
- Cannot read properties of undefined (reading 'setAttribute') HOT 6
- Disable font-face exclusion
- The `allowRules` option is missing in the types and documentation
- Passing includeSelectors config HOT 2
- Add the option of a prefix path HOT 1
- Used css attribute selector gets removed by critters
- Feature Request: Expose method `processCss` which returns inlined css only
- Simple Example fails
- Building Angular 17.1 with Angular CLI when using Bootstrap 5.3.2 results in Critical CSS Inlining failing because 2 rules are skipped due to selector errors HOT 9
- 2 different lock files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from critters.