2019-04-24
- Fixed TypeScript support
2019-04-22
- Updated homepage URL in package.json
2019-04-22
Breaking Changes
-
Added support for incremental updates. This change significantly increases performance on subsequent ponyfill calls by applying transformed CSS to the DOM using multiple
<style>
elements instead of a single element as was done in 1.x. -
Renamed
options.onlyVars
tooptions.preserveStatic
-
Renamed
options.preserve
tooptions.preserveVars
-
Changed
options.onComplete
behavior so that the second argument returns anarray
of<style>
elements appended to the DOM during each ponyfill call. Previously, this argument returned a single element reference because the ponyfill used only a single<style>
element. -
Removed
options.fixNestedCalc
. Nestedcalc()
statements are modified for compatibility with legacy browsers as they were previously when this option was set totrue
(default). Only the option to disable this functionality has been removed. -
Removed
dist
directory from repo
Other Changes
- Fixed bug that allowed :root-level custom property declarations in comments
and media queries be processed when initially called with
options.shadowDOM
set to true
2019-03-08
-
Fixed error in legacy browsers caused by improper
performance.now()
check -
Fixed TypeScript definitions by adding
benchmark
tooptions.onComplete
2019-03-01
-
Added
data-cssvars
attribute to processed<link>
and<style>
elements -
Changed ponyfill
<style>
injection logic so that the element is always available in the correct DOM position (even whenupdateDOM
isfalse
) and a reference is always returned with theoptions.onComplete
callback. -
Fixed detection of unchanged source CSS and ponyfill options
2019-02-26
-
Added optimization that prevents reprocessing data when input is unchanged from previous ponyfill call.
-
Added console
info
message when input is unchanged from previous ponyfill call. -
Added
benchmark
argument tooptions.onComplete
callback which provides the execution time of a ponyfill call in milliseconds. -
Added
cssVars():
prefix to all console messages. -
Changed
options.watch
debounce timer from1
to100
milliseconds. -
Fixed
options.watch
MutationObserver performance issue that resulted in unnecessary processing when a large number of DOM mutations occur. -
Fixed
options.watch
performance issue that resulted in unnecessary consecutive ponyfill calls (initial call + first mutation).
2019-01-30
- Fixed IE9 CORS check by updating
get-css-data
dependency
2019-01-25
-
Updated method of merging default and user options from deep to shallow merge to better accommodate SSR / virtual DOM environments.
-
Fixed parsing of variable functions that contain spaces, tabs, and new lines.
2018-12-23
- Updated preferred CDN link to jsdelivr.
2018-12-17
- Fixed removal of unrecognized at-rule when
options.onlyVars
istrue
.
2018-12-14
-
Added
types
property to package.json. -
Updated
options.onlyVars
implementation resulting in a significant performance increase. -
Fixed build status badge (now reflects only master branch status).
2018-11-28
- Fixed bug that incorrectly transformed variable functions that resolve to values containing parenthesis with fallback values that also contain parenthesis (#42).
2018-11-24
- Updated README with
options.onlyLegacy
examples.
2018-11-14
- Fixed bug that prevented IE10 from fetching
<link>
CSS data from external domains.
2018-11-12
- Changed
options.onSuccess
callback to better handle falsey return values (e.g.false
,null
,0
,""
).
2018-11-11
- Updated
get-css-data
dependency and added test for invalid<link>
CSS text (test for HTML returned from stylesheet 404 redirect).
2018-11-09
-
Added ability to change the ponyfill settings used by the
options.watch
MutationObserver by settingoptions.watch
set totrue
. -
Added ability to disconnect the ponyfill MutationObserver by setting
options.watch
tofalse
.
2018-11-06
-
Changed
options.onComplete
callback to return a clone instead of a reference to the internal variable storage object as thecssVariables
argument. -
Fixed bug that prevented
options.variables
values from persisting properly (regression introduced in 1.11.0).
2018-11-04
- Fixed bug that caused the
options.onComplete
callback'scssVariables
argument to be returned as an empty object whenoptions.updateDOM
is set tofalse
.
2018-10-25
- Added TypeScript definitions.
2018-10-24
- Fixed bug in modern browsers that caused
options.variables
values to be applied to thedocument
instead of theoptions.rootElement
, resulting in custom properties being applied to all elements instead of scoped to the specified root element.
2018-10-03
-
Added logic to automatically get document-level CSS custom property values when
options.rootElement
has been set to a shadow host or root. These values are required by the polyfill to transform shadow<link>
and<style>
elements. This new behavior makes it possible to target a shadow host or root element without manually getting the document-level custom property values first. -
Fixed custom property values not persisting when CSS being processed contains only custom properties.
-
Fixed ‘document is not defined’ error in SSR environment introduced in 1.10.0.
2018-09-28
-
Added
options.rootElement
for specifying the root element to traverse for<link>
and<style>
elements. -
Added
options.shadowDOM
to determine if shadow DOM<link>
and<style>
elements should be processed. -
Added
cssVariables
argument tooptions.onComplete
callback.
2018-08-07
-
Added check for non-browser environments to support Node+SSR. (#16)
-
Fixed keyframe animation fix by adding vendor prefixes for
animation-name
and@keyframes
. -
Fixed internal placeholder comments appearing in CSS output instead of stylesheet content. (#15)
-
Fixed multiple var() functions resolving to
undefined
when they do not resolve to a custom property or fallback value. (#18)
2018-07-12
-
Added
options.watch
feature which creates a MutationObserver that will execute the ponyfill when a<link>
or<style>
DOM mutation is observed. (#8) -
Added fix for browser-related bugs that prevent keyframe animations from being applied when values are initially set using custom properties or updated using the
variables
ponyfill options. (#13) -
Fixed inaccurate “variable is undefined” console warning when a custom property value is
0
orfalse
.
2018-05-20
-
Changed
options.onError
callbackurl
argument so that it always returns an absolute URL. -
Updated README with
options.onError
fixes and a few other minor tweaks.
2018-05-19
-
Fixed
options.onError
message sent to console so that a URL is included when the status code is0
. Also added a hint that these errors are possibly related to CORS restrictions to assist debugging efforts. -
Updated README with performance tips and better examples for
options.include
andoptions.exclude
.
2018-05-18
- Added optimization that allows the ponyfill to skip processing of
<link>
and<style>
data that does not contain a CSS custom property declaration or function. (#9)
2018-05-17
- Added
options.updateURLs
for converting relativeurl()
paths to absolute urls. (#8)
2018-05-16
-
Added
options.onBeforeSend
callback. (#7) -
Changed
options.onSuccess
callback so that it is called after CSS data has been collected from each element before CSS custom properties have been transformed.
2018-04-23
-
Updated
get-css-data
dependency to 1.2.0 to resolve a callback related bug. -
Changed logic for inserting generated
<style>
element. Element is now inserted after the last<style>
or<link>
element processed. This change, combined with the proceeding change, ensures that the original cascade order is maintained after the transformed styles are appended to the DOM. -
Changed
options.onlyVars
default value fromtrue
tofalse
. This change, combined with the preceding change, ensures that the original cascade order is maintained after the transformed styles are appended to the DOM.
2018-04-17
- Added
fixNestedCalc
option to remove nestedcalc
keywords for legacy browser compatibility.
2018-03-24
- Updated README Examples section.
2018-03-20
- Updated README Examples section.
2018-03-20
- Fixed "Cannot read property 'length' of undefined" bug triggered while filtering comments that are a direct descendant of an at-rule. (#1)
2018-03-12
- Updated README browser support table.
2018-03-12
- Updated README: Added TOC, added demo link, added browser support table, updated examples.
2018-02-08
-
Fixed bug that prevented
options.onlyVars
from properly filtering declarations that do not contain a custom property value or function. -
Changed
options.preserve
default value fromtrue
tofalse
. This aligns with other default values which assume a "legacy-only" configuration. -
Changed logic for inserting generated
<style>
element. Element is now inserted as first CSS source element rather than the last. This allows the cascade order to be maintained whenoptions.onlyVars
istrue
.
2018-01-31
- Initial release