Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chemzqm/postcss-baseurl

postcss plugin for add baseurl to url assets
https://github.com/chemzqm/postcss-baseurl

Last synced: about 1 month ago
JSON representation

postcss plugin for add baseurl to url assets

Awesome Lists containing this project

README

        

# PostCSS Baseurl [![Build Status][ci-img]][ci]

[PostCSS] plugin for add baseurl to absolute url assets.

[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/chemzqm/postcss-baseurl.svg
[ci]: https://travis-ci.org/chemzqm/postcss-baseurl

```css
.foo {
background: url('/image.png')
}
```

```css
.foo {
background: url('/mobile/image.png')
}
```

## Usage

```js
postcss([
require('postcss-baseurl')({
base: '/mobile'
})
])
```

See [PostCSS] docs for examples for your environment.