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 help output, added Ant task instructions authored Dec 17, 2011 by tivac's avatar tivac
Show whitespace changes
Inline Side-by-side
Home.textile
View page @ ae90c1bd
...@@ -25,8 +25,33 @@ Global Options ...@@ -25,8 +25,33 @@ Global Options
--mhtmlroot <root> Use <root> as the MHTML root for the file. --mhtmlroot <root> Use <root> as the MHTML root for the file.
-v, --verbose Display informational messages and warnings. -v, --verbose Display informational messages and warnings.
--root <root> Prepends <root> to all relative URLs. --root <root> Prepends <root> to all relative URLs.
--skip-missing Don't throw an error for missing image files.
--max-uri-length len Maximum length for a data URI. Defaults to 32768.
--max-image-size size Maximum image size (in bytes) to convert.
-o <file> Place the output into <file>. Defaults to stdout. -o <file> Place the output into <file>. Defaults to stdout.
h1. Ant Task Usage
Define the task
bc.. <taskdef
name="cssembed"
classname="net.nczonline.web.cssembed.CSSEmbedTask"
classpath="/path/to/cssembed.jar"
/>
p. then use it.
bc.. <cssembed
root="."
skipMissing="true"
maxImageSize="4096"
>
<fileset dir="." includes="**/*.css" />
</cssembed>
p. Attributes on the @cssembed@ task line up with the command-line arguments, simply replace @-@ with camelCase.
h1. 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@. 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@.
......
Clone repository
  • Changelog
  • DataURI
  • Home