Coder Social home page Coder Social logo

Comments (3)

nzakas avatar nzakas commented on May 19, 2024

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.

robflaherty avatar robflaherty commented on May 19, 2024

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.

nzakas avatar nzakas commented on May 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.