Supported Features of the Polyfill
masterThe polyfill provides comprehensive support for CSS Custom Properties in IE11, including:
- CSS Syntax: Chaining (
--bar:var(--foo)), fallbacks (var(--color, blue)), and support forinherit,initial,unset, andrevertkeywords. - Dynamic Content: Handles dynamically added HTML content,
<style>elements, and<link>elements. - Selectors & Media: Supports
:focus,:target,:hover, and media queries (triggering a redraw on change). - JavaScript Integration: Extends standard APIs to work with custom properties:
style.setProperty('--x','y')style.getPropertyValue('--x')getComputedStyle(el).getPropertyValue('--inherited')
- Advanced APIs: Supports Houdini's
CSS.registerProperty(though properties remain non-animatable). - Other: SVG support, cascade and inheritance support, and
!importantsupport on setters/getters.