[英]Override inline style with a CSS mixin in Polymer 2
Is there a way to override the inline style of a component in Polymer 2 with a CSS mixin ? 有没有办法用CSS mixin覆盖Polymer 2中组件的内联样式 ?
In Polymer 1, I had a similar code as below in my component to do that and it is working fine (see #1 image): 在Polymer 1中,我在组件中有一个类似于以下代码的代码,它工作正常(请参见#1图像):
<style>
paper-menu-button {
display: block;
--paper-menu-button-dropdown: {
position: relative !important;
top: auto !important;
left: auto !important;
display: block;
};
--paper-menu-button-content: {
max-width: none !important;
max-height: none !important;
display: block;
};
}
</style>
But with Polymer 2, it is not working anymore (see #2 image). 但是对于Polymer 2,它不再起作用了(请参阅#2图像)。
JS bin for Polymer 2. 聚合物2的JS仓 。
1. Polymer 1 : CSS: 1.聚合物1: CSS:
Output: 输出:
Thanks! 谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.