css – Polymer 1.0 app-theme仅影响index.html,而不影响自定义元素

栏目: CSS · 发布时间: 7年前

内容简介:翻译自:https://stackoverflow.com/questions/30900593/polymer-1-0-app-theme-only-affecting-index-html-and-not-on-custom-elements
我正在使用Polymer Starter Kit,我想将脚手架移动到它自己的元素<main-scaffold>中. app-theme.html中有一些样式应用于它之前我将它从index.html移入它自己的元素,但现在没有任何样式适用.对于我放入自己的自定义元素的任何元素集都是这种情况.应用于<paper-material>的自定义样式来自app-theme.html的内容未在我的<

home-page>中应用元件.我希望某些元素在全局范围内应用主题. app-theme.html中唯一适用于其他任何地方的样式是CSS自定义属性,例如–dark-primary-color.

有什么办法可以创建适用于整个项目的主题吗?我已经尝试将app-theme.html专门导入到我的元素中,并没有什么区别.提前致谢.

polymerthemes.com

的主题应该适用于整个项目.

只需下载其中一个预制主题(或使用 Polymer Theme Builder 创建自己的主题)并在<head>中链接到它,如下所示:

<style is="custom-style">
    @import url("path/to/theme.css");
</style>

或者,看看如何在该网站上应用样式.

免责声明:我是polymerthemes.com的创始人之一.

翻译自:https://stackoverflow.com/questions/30900593/polymer-1-0-app-theme-only-affecting-index-html-and-not-on-custom-elements


以上所述就是小编给大家介绍的《css – Polymer 1.0 app-theme仅影响index.html,而不影响自定义元素》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Design and Analysis of Distributed Algorithms (Wiley Series on P

Design and Analysis of Distributed Algorithms (Wiley Series on P

Nicola Santoro / Wiley-Interscience / 2006-10-27 / USD 140.95

This text is based on a simple and fully reactive computational model that allows for intuitive comprehension and logical designs. The principles and techniques presented can be applied to any distrib......一起来看看 《Design and Analysis of Distributed Algorithms (Wiley Series on P》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具