Comments (3)
I'm not sure I understand what you're asking for. Can you explain in more detail how you envision this working and what the use case is?
from cssembed.
Apologies. It may be beyond the scope of the project. Instead of embedding the data URIs in the main stylesheet, the background image declarations would be removed from the main stylesheet and recreated in a separate, dedicated data URI stylesheet.
Here's an example:
http://getpepperminted.com/dev2/css/data-uris.css
Placing the data URIs in a separate file provides the option of serving alternate content to non-supportive browsers. It also allows the main CSS and the data URIs to be cached separately, which can be useful.
from cssembed.
Ah I see, thanks for the explanation. I do think this is beyond the scope of what CSSEmbed should do, as it's a pretty specific use case and this tool was really intended to be general-purpose. If someone wanted to do that, what I'd probably recommend is that they create the core style sheet and the images style sheet, and then use CSSEmbed to create the data URI-based style sheet by processing the already-existing images one.
What you're asking for would require CSSEmbed to fully parse the CSS to determine which styles belong where, and that's far beyond the scope of what I envisioned this tool to be.
That being said, I could see another tool being built on CSSEmbed to do just that.
from cssembed.
Related Issues (20)
- Allow embedding of fonts
- Support passing CSS string through stdin HOT 2
- CSS background images absolute path HOT 5
- Add option to make the changes directly in the input file HOT 2
- Fixed Vista/IE7 bug (patch inside) HOT 3
- Add cssembed to maven central repo HOT 5
- Option to ignore commented CSS rules HOT 4
- Insert newline between base64 value and next multipart separator
- Don't create invalid files
- Missing local files shouldn't stop execution HOT 1
- getImageURIString skips images that have query string parameters
- Documentation update: IE now requires MIME type 'message/rfc822' for MHTML content
- url parameter parsing HOT 2
- Stops on download error with an exception?
- Skipping per line
- Add support for svg content-types
- recognizing data uris already in css
- Size comparisons
- Allow embedding of cursor images
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 cssembed.