Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C cssembed
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 13
    • Issues 13
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Nicholas C. Zakas
  • cssembed
  • Wiki
  • Home

Home · Changes

Page history
Updated Introduction (textile) authored Nov 22, 2011 by nzakas's avatar nzakas
Show whitespace changes
Inline Side-by-side
Home.textile
View page @ 74ff7040
......@@ -2,25 +2,6 @@ h1. Introduction
CSSEmbed is a simple utility to automate creation of CSS files with embedded data URIs. It can read in any CSS file, detect the image files referenced, and then replace them with data URIs. The result is a CSS file that is exactly the same as the original with the exception that all valid image files have been replaced with data URIs.
h1. Related Reading
h2. Posts About CSSEmbed
* "Automatic data URI embedding in CSS files":http://www.nczonline.net/blog/2009/11/03/automatic-data-uri-embedding-in-css-files/
* "Convert CSS images to data URIs automatically with CSSEmbed":http://www.ravelrumba.com/blog/convert-css-images-to-data-uris-automatically-with-cssembed/
* "CSSEmbed - automatically data: URI-ize":http://www.stevesouders.com/blog/2009/11/16/cssembed-automatically-data-uri-ize/
* " How to reduce the number of HTTP requests":http://robertnyman.com/2010/01/15/how-to-reduce-the-number-of-http-requests/
h2. Posts About Data URIs
* "Data URIs explained":http://www.nczonline.net/blog/2009/10/27/data-uris-explained/
* "Data URI browser issues":http://sharovatov.wordpress.com/2008/05/13/data-uri-browser-issues/
* "Data URI theory and practice":http://sharovatov.wordpress.com/2008/05/11/data-uri-theory-and-practice/
* "Data URLs - what are they and how to use them":http://phpied.com/data-urls-what-are-they-and-how-to-use
* "RFC-2397: The 'data' URL scheme":http://tools.ietf.org/html/rfc2397
* "MHTML – when you need data: URIs in IE7 and under":http://www.phpied.com/mhtml-when-you-need-data-uris-in-ie7-and-under/
h1. Basic Usage
CSSEmbed is used as follows:
......@@ -56,6 +37,14 @@ bc. java -jar cssembed-x.y.z.jar --root http://www.nczonline.net/images styles.c
This causes all image URLs to be prepended with @http://www.nczonline.net/images@ before attempting resolution (this happens only for those URLs that don't already have "http://" at the beginning.
h1. Skipping Images
You can specify that an image should be skipped by adding a special comment after the image:
bc. background: url(foo.png); /*CSSEmbed:SKIP*/
This ensures that the given image will not be converted to a data URI regardless of command line settings.
h1. MHTML Support
Version 0.3.0 introduces initial support for generating MHTML CSS files (for more information on MHTML files, see "MHTML - when you need data: URIs in IE7 and under":http://www.phpied.com/mhtml-when-you-need-data-uris-in-ie7-and-under/). When you specify the @--mhtml@ option, this puts CSSEmbed into MHTML mode and the resulting CSS file is generated for use with Internet Explorer 7 and lower using the format specified in the linked article.
......@@ -90,6 +79,25 @@ at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
p. This means that you're attempting to run CSSEmbed on an earlier version of the JVM. CSSEmbed requires Java 1.5 to execute.
h1. Related Reading
h2. Posts About CSSEmbed
* "Automatic data URI embedding in CSS files":http://www.nczonline.net/blog/2009/11/03/automatic-data-uri-embedding-in-css-files/
* "Convert CSS images to data URIs automatically with CSSEmbed":http://www.ravelrumba.com/blog/convert-css-images-to-data-uris-automatically-with-cssembed/
* "CSSEmbed - automatically data: URI-ize":http://www.stevesouders.com/blog/2009/11/16/cssembed-automatically-data-uri-ize/
* " How to reduce the number of HTTP requests":http://robertnyman.com/2010/01/15/how-to-reduce-the-number-of-http-requests/
h2. Posts About Data URIs
* "Data URIs explained":http://www.nczonline.net/blog/2009/10/27/data-uris-explained/
* "Data URI browser issues":http://sharovatov.wordpress.com/2008/05/13/data-uri-browser-issues/
* "Data URI theory and practice":http://sharovatov.wordpress.com/2008/05/11/data-uri-theory-and-practice/
* "Data URLs - what are they and how to use them":http://phpied.com/data-urls-what-are-they-and-how-to-use
* "RFC-2397: The 'data' URL scheme":http://tools.ietf.org/html/rfc2397
* "MHTML – when you need data: URIs in IE7 and under":http://www.phpied.com/mhtml-when-you-need-data-uris-in-ie7-and-under/
h1. Copyright and License
Copyright (C) 2009 Nicholas C. Zakas. All rights reserved.
......
Clone repository
  • Changelog
  • DataURI
  • Home