Name: polymer-css-build
Owner: polymer
Description: null
Created: 2016-04-02 00:26:40.0
Updated: 2018-01-13 01:19:21.0
Pushed: 2017-10-17 23:41:24.0
Homepage: null
Size: 96
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Statically apply Polymer's CSS Mixin shim and CSS Custom Property shim (future work)
npm install
node bin/polymer-css-build path/to/vulcanized-file.html
TL;DR: Set
--build-for-shady
if you don't usePolymer = {dom: 'shadow'}
in your app.
Polymer by default uses ShadyDOM, a lightweight shim of the ShadowDOM spec.
Real ShadowDOM can be used by setting Polymer = {dom: 'shadow'}
before the HTMLImport for Polymer.
We define “targeted builds” to mean that when using the matching polymer-css-build
type and Polymer dom
setting, no additional runtime style work will be performed.
By default, polymer-css-build
will produce built styles that are targeted for ShadowDOM.
This is done because ShadowDOM styles can still be used in ShadyDOM mode with some runtime work, and the built styles are portable to both Polymer ShadyDOM and ShadowDOM scoping modes
However, if your app only uses ShadyDOM (the default of Polymer 1.x), then some runtime work is still done to convert CSS selectors.
To produce a targeted build for ShadyDOM, pass the --build-for-shady
flag on the command line, or {'build-for-shady': true}
to the library.
However, these styles will only work with the ShadyDOM dom
setting; the modifications for ShadyDOM remove some CSS selector information necessary for ShadowDOM.