Skip to content
This repository was archived by the owner on Oct 14, 2022. It is now read-only.

Commit eb7766f

Browse files
author
tim.meissner
committed
Update to 1.16.2
2 parents 1983a90 + 6086ec1 commit eb7766f

25 files changed

+2553
-3444
lines changed

.markdownlint.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"default": true,
3+
"MD001": false,
4+
"MD004": { "style": "consistent" },
5+
"MD013": false,
6+
"MD033": false,
7+
"MD036": false
8+
}

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
sudo: required
2+
dist: trusty
23
language: node_js
34
node_js: "stable"
45

56
addons:
67
chrome: stable
8+
hosts:
9+
- travis.dev
710

811
notifications:
912
email: false
1013

1114
before_install:
15+
# Console
1216
- stty cols 80
17+
# Chrome setup
18+
- export CHROME_BIN=chromium-browser
19+
- export DISPLAY=:99.0
20+
- sh -e /etc/init.d/xvfb start
1321

1422
script:
1523
# Main repo

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,54 @@
11
# Change Log
22

3+
## 1.16.2
4+
5+
*2018-12-23*
6+
7+
- Updated preferred CDN link to jsdelivr.
8+
9+
## 1.16.1
10+
11+
*2018-12-17*
12+
13+
- Fixed removal of unrecognized at-rule when `options.onlyVars` is set to `true`.
14+
15+
## 1.16.0
16+
17+
*2018-12-14*
18+
19+
- Added `types` property to package.json.
20+
- Updated `options.onlyVars` implementation resulting in a significant
21+
performance increase.
22+
- Fixed build status badge (now reflects only master branch status).
23+
24+
## 1.15.3
25+
26+
*2018-11-28*
27+
28+
- Fixed bug that incorrectly transformed variable functions that resolve to
29+
values containing parenthesis with fallback values that also contain
30+
parenthesis (#42).
31+
32+
## 1.15.2
33+
34+
*2018-11-24*
35+
36+
- Updated README with `options.onlyLegacy` examples.
37+
38+
## 1.15.1
39+
40+
*2018-11-14*
41+
42+
- Fixed bug that prevented IE10 from fetching `<link>` CSS data from external
43+
domains.
44+
45+
## 1.15.0
46+
47+
*2018-11-12*
48+
49+
- Updated `options.onSuccess` callback to better handle falsey return values
50+
(e.g. `false`, `null`, `0`, `""`).
51+
352
## 1.14.0
453

554
*2018-11-11*

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# css-vars-ponyfill
22

33
[![NPM](https://img.shields.io/npm/v/css-vars-ponyfill.svg?style=flat-square)](https://www.npmjs.com/package/css-vars-ponyfill)
4-
[![Build Status](https://img.shields.io/travis/jhildenbiddle/css-vars-ponyfill.svg?style=flat-square)](https://travis-ci.org/jhildenbiddle/css-vars-ponyfill)
4+
[![Build Status](https://img.shields.io/travis/jhildenbiddle/css-vars-ponyfill/master.svg?style=flat-square)](https://travis-ci.org/jhildenbiddle/css-vars-ponyfill)
55
[![Codacy](https://img.shields.io/codacy/grade/5d967da1e518489aac42d99b87088671.svg?style=flat-square)](https://www.codacy.com/app/jhildenbiddle/css-vars-ponyfill?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=jhildenbiddle/css-vars-ponyfill&amp;utm_campaign=Badge_Grade)
66
[![Codecov](https://img.shields.io/codecov/c/github/jhildenbiddle/css-vars-ponyfill.svg?style=flat-square)](https://codecov.io/gh/jhildenbiddle/css-vars-ponyfill)
77
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://github.com/jhildenbiddle/css-vars-ponyfill/blob/master/LICENSE)
@@ -63,17 +63,11 @@ Git:
6363
git clone https://github.com/jhildenbiddle/css-vars-ponyfill.git
6464
```
6565

66-
CDN ([unpkg.com](https://unpkg.com/) shown, also on [jsdelivr.net](https://www.jsdelivr.com/)):
66+
CDN ([jsdelivr.com](https://www.jsdelivr.com/) shown, also on [unpkg.com](https://unpkg.com/)):
6767

6868
```html
69-
<!-- file.html (latest v1.x.x) -->
70-
71-
<script src="https://unpkg.com/css-vars-ponyfill@1"></script>
72-
<script>
73-
cssVars({
74-
// ...
75-
});
76-
</script>
69+
<!-- Latest v1.x.x -->
70+
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@1"></script>
7771
```
7872

7973
## Examples
@@ -382,6 +376,16 @@ When `true`, the ponyfill will only transform custom properties, generate CSS, a
382376
cssVars({
383377
onlyLegacy: true // default
384378
});
379+
380+
cssVars({
381+
// Treat all browsers as legacy
382+
onlyLegacy: false
383+
});
384+
385+
cssVars({
386+
// Treat Edge 15/16 as legacy
387+
onlyLegacy: !(/Edge\/1[56]\./i.test(navigator.userAgent))
388+
});
385389
```
386390

387391
### options.onlyVars
@@ -725,7 +729,7 @@ cssVars({
725729
1. **node**: The source node `object` reference
726730
1. **url**: The source URL `string` (`<link>` href, `@import` url, or page url for `<style>` data)
727731

728-
Callback after CSS data has been collected from each node and *before* CSS custom properties have been transformed. Allows modifying the CSS data before it is transformed by returning any `string` value (or `false` to skip).
732+
Callback after CSS data has been collected from each node. Allows modifying the CSS data before it is added to the final output by returning any `string` value or skipping the CSS data by returning `false`, `null`, or an empty string (`""`).
729733

730734
**Note:** The order in which `<link>` and `@import` CSS data is "successfully" collected (thereby triggering this callback) is not guaranteed as these requests are asynchronous.
731735

0 commit comments

Comments
 (0)