Skip to content

Stable Release v1.7.0

Compare
Choose a tag to compare
@dfreedm dfreedm released this 28 Sep 21:40
· 6886 commits to master since this release

New Features

Forward Compatibility with 2.0

<slot> element

In order to provide a smooth migration path from Polymer 1.x to 2.x, we've enabled elements to opt-in to using the new <slot> element, and ::slotted() CSS selector from ShadowDOM v1.

This is not required for current Polymer 1.x elements, but using the new syntax will make it easier to port elements to 2.x. (More details about transitioning to <slot> here).

Elements using <slot> and ::slotted() will be transformed to the equivalent use of <content> and ::content like this example:

As written:

<dom-module id="x-forward-compat">
  <template>
    <style>
      #container ::slotted(.foo) {
        color: red;
      }
      #namedContainer ::slotted(*) {
        border: 2px solid black;
      }
    </style>
    <div id="namedContainer">
      <slot name="named"></slot>
    </div>
    <div id="container">
      <slot></slot>
    </div>
  </template>
</dom-module>

After runtime transform:

<dom-module id="x-forward-compat">
  <template>
    <style>
      #container ::content > .foo {
        color: red;
      }
      #namedContainer ::content > * {
        border: 2px solid black;
      }
    </style>
    <div id="namedContainer">
      <content select="[slot=named]"></content>
    </div>
    <div id="container">
      <content></content>
    </div>
  </template>
</dom-module>

html selector in <style is="custom-style">, :host > * selector in elements

Another Polymer 2.x change is removing the :root selector and replacing it with html in <style is="custom-style">, and :host > * in element styles.

This release allows for using both html and :root in <style is="custom-style">, and using both :root and :host > * in element styles

Meaningful Changes

  • Fixed an accessibility issue with iOS related to the tap event.
  • Improved performance of a workaround for stale styles in IE

Raw Notes

  • Fix IE style cache performance (commit)
  • no need for :root to be first in the selector (commit)
  • fix tests on !chrome browsers (commit)
  • Translate :root to :host > * for element styles (commit)
  • Define checkRoot only once (commit)
  • Fix normalizeRootSelector (commit)
  • Comment on using the ast walker to replace selector (commit)
  • update travis config (commit)
  • Transform ::slotted() to ::content (commit)
  • Test on native shadow DOM also. (commit)
  • Reorder. (commit)
  • Remove unused. (commit)
  • Add fallback support/test. (commit)
  • A little more dry. (commit)
  • Use name. (commit)
  • Support default slot semantics. (commit)
  • Remove opt-in. Exclude content from copy. (commit)
  • Make sure click events can always trigger tap, even on touch only devices (commit)
  • Add support for slot->content transformation. Need to bikeshed opt-in attribute (currently "auto-content") (commit)
  • Support more expressive :root and html selectors (commit)
  • Fix typo (commit)
  • test for mixins in custom-style ordering (commit)
  • Do not insert semicolon when fixing var() syntax (commit)
  • Make sure mixins are applied no matter the ordering of definition (commit)
  • Update gulp-eslint to 3.x (commit)
  • Fixes #3676: retain <style> in <template preserve-content/> (commit)
  • [ci skip] Update Changelog for v1.6.1 (commit)
  • Apply to _marshalArgs. (commit)
  • Rename Path.head() to Path.root(). (commit)
  • Use head in templatizer (commit)
  • Modify _annotationPathEffect (commit)
  • Use isDescendant (commit)
  • Use isDeep (commit)
  • Replace _fixPath. (commit)
  • Replace _modelForPath. (commit)
  • Replace _patchMatchesEffect. (commit)
  • Add path library. (commit)
  • Revert "Fix _patchMatchesEffect. (#3631)" (commit)