Travis build: 461

This commit is contained in:
Travis CI
2017-12-28 22:38:33 +00:00
parent bce0ff38d3
commit 6eef03c589
4 changed files with 67 additions and 3 deletions

View File

@ -9,5 +9,5 @@ const getStyle = (el, ruleName) => getComputedStyle(el)[ruleName];
```
```js
getStyle(document.querySelector('p'), 'font-size') // '16px'
getStyle(document.querySelector('p'), 'font-size'); // '16px'
```

View File

@ -5,9 +5,9 @@ Sets the value of a CSS rule for the specified element.
Use `element.style` to set the value of the CSS rule for the specified element to `value`.
```js
const setStyle = (el, ruleName, value) => el.style[ruleName] = value;
const setStyle = (el, ruleName, value) => (el.style[ruleName] = value);
```
```js
setStyle(document.querySelector('p'), 'font-size', '20px') // The first <p> element on the page will have a font-size of 20px
setStyle(document.querySelector('p'), 'font-size', '20px'); // The first <p> element on the page will have a font-size of 20px
```