DescriptionPresubmit test for overriding properties generated by Polymer mixin shim
Ensure we don't try to use an implementation detail of Polymer which could
break and is hacky.
With Polymer.useNativeCSSProperties enabled, Polymer uses custom properties to
shim mixins:
:root {
--paper-mixin {
color: green;
--paper-button-color: red;
}
}
my-element
@apply(--paper-mixin);
}
becomes
:root {
--paper-mixin_-_color: green;
--paper-mixin_-_paper-button-color: red;
}
my-element {
color: var(--paper-mixin_-_color);
--paper-button-color: var(--paper-mixin_-_paper-button-color);
}
This happens at run-time, if custom variables are enabled, if the @apply shim
is used. Trying to change <my-element> my directly setting these variables:
my-element {
--paper-mixin_-_paper-button-color: blue; /* BAD */
}
is unsafe.
R=dbeam@chromium.org
Committed: https://crrev.com/da606cedfa596f11a7e77a5197e86cdcd845500e
Cr-Commit-Position: refs/heads/master@{#413256}
Patch Set 1 #
Messages
Total messages: 7 (2 generated)
|