Deprecating /deep/

As you may have heard, the /deep/ and ::shadow combinators are being deprecated, in favor of using CSS custom properties to more carefully inherit styles across shadow boundaries.

This is important, since it changes the way your app and Polymer elements are using the styles in paper-styles and iron-flex-layout. Both of these elements offer "mixin" and "classes" versions of all the styles: the classes version, in particular, uses the /deep/ combinator for each of its styles, making these styles available throughout your application and within all element shadow roots. The mixin version defines custom property mixins, which can be selectively applied inside elements where needed.

To help transition away from using /deep/ and ::shadow, we’re slowly updating all our elements and their demos, and replacing the “classes” versions of all these styles with the mixin equivalents. This means that, prior to this update, if an element was using the “classes” version of iron-flex-layout, you would have been able to magically use any of the flex layout classes in any of your other elements, because /deep/ made them accessible everywhere. This no longer will be the case, so after updating you might see layout issues in your application, if this was something you were accidentally relying on.

For example, the paper-toolbar element used to transitively import the class-based iron-flex-layout that used /deep/ to pierce shadow roots. This means you could have accidentally done something like:

Our recommendation for now is to start using the mixin versions in your app as well. If after the update you’re noticing that some flex styles are no longer being applied correctly, it’s probably the case that your element needs to import ‘iron-flex-layout/iron-flex-layout.html`, and apply the correct flex mixin: