Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,25 @@ Whether to remove the original `<link rel="stylesheet">` tags after (possibly) i
Type: `String`
Default: `filePath`

How to resolve hrefs.
How to resolve hrefs. Must be a string of one character or more. **Required**.

Relative urls in links will have this value prepended to them. So these links:
* `<a href="page-relative">Page</a>`
* `<a href="/root-relative">Root</a>` <- _note leading /_


With this option:
```js
inlineCss(html, { url: 'http://example.com/mushroom'})
.then(function(html) { console.log(html); });
```

Will result in

* `<a href="http://example.com/mushroom/page-relative">Page</a>`
* `<a href="http://example.com/root-relative">Root</a>`

If you don't need this feature, simply set the property to a short string eg `{url: ' '}` (one space) and everything will work.

#### options.preserveMediaQueries

Expand Down