Giter VIP home page Giter VIP logo

polymer-css-build's Introduction

Polymer CSS Builder

Statically apply Polymer's CSS Mixin shim and CSS Custom Property shim (future work)

Use

  1. Vulcanize your project
  2. Checkout this tool
  3. npm install
  4. node bin/polymer-css-build path/to/vulcanized-file.html
  5. If multiple files are passed, they are expected to be shards of the same project

Build Types, Targeted Builds, and Polymer DOM modes

TL;DR: Set --build-for-shady if you don't use Polymer = {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.

polymer-css-build's People

Contributors

danbeam avatar dfreedm avatar rictic avatar zzo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.