Skip to content

Commit

Permalink
Merge pull request #125 from bolasblack/update-nested-document
Browse files Browse the repository at this point in the history
Make nested function document style close to other section.
  • Loading branch information
jonathanong committed Dec 5, 2013
2 parents e546f91 + 6c9bf4a commit 14fabf7
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions Readme.md
Expand Up @@ -202,8 +202,8 @@ Please delegate any issues with `.extend()` to that repository instead of rework

### .at2x([vendors])

Adds `at-2x` keyword to `background` and `background-image`
declarations to add retina support for images, with optional
Adds `at-2x` keyword to `background` and `background-image`
declarations to add retina support for images, with optional
`vendor` prefixes, defaulting to `.vendors()`.

```css
Expand Down Expand Up @@ -460,23 +460,21 @@ input {

Nested functions works well too:

```css
input {
top: divide(subtract(30, floor(multiply(20, 10))), 2);
}
```

```javascript
var functions = {
}

rework(css)
var css = rework(css)
.use(rework.function(
subtract: function(a, b) { return a - b },
multiply: function(a, b) { return a * b },
divide: function(a, b) { return a / b },
floor: Math.floor
)).toString()
))
.toString()
```

```css
input {
top: divide(subtract(30, floor(multiply(20, 10))), 2);
}
```

Would yield:
Expand Down Expand Up @@ -621,7 +619,7 @@ yields:
### .url(fn)

Map `url()` calls. Replace all `url()`s using a given function.

```js
var css = rework(read(css))
.use(rework.url(function(url){
Expand Down

0 comments on commit 14fabf7

Please sign in to comment.