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
Migrated from home v5 authored Sep 13, 2010 by nzakas's avatar nzakas
Hide whitespace changes
Inline Side-by-side
Home.textile
View page @ 935ddef8
h1. CSSEmbed
h2. Introduction
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.
h2. Basic Usage
h1. Basic Usage
CSSEmbed is used as follows:
......@@ -27,7 +25,7 @@ bc. -v, --verbose Display informational messages and warnings.
bc. -root <root> Prepends <root> to all relative URLs.
bc. -o <file> Place the output into <file>. Defaults to stdout.
h2. Resolving Files
h1. Resolving Files
When CSSEmbed comes across a URL reference in CSS (@url(filename)@), it inspects the filename to determine where the file is actually located. If the filename begins with "http://", then the file is downloaded from that location. Files that don't begin with "http://" are assumed to be local and their location is resolved relative to the location of the CSS file. If, for example, the CSS code contains @url(../../image.png)@, then CSSEmbed looks to the directory that is two levels above the CSS file for @image.png@.
......@@ -36,3 +34,13 @@ You can force a specific resolution by using the @--root@ option on the command
bc. java -jar cssembed-0.1.0.jar --root http://www.nczonline.net/images styles.css
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. Copyright and License
Copyright (C) 2009 Nicholas C. Zakas. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
Clone repository
  • Changelog
  • DataURI
  • Home