1

I'm trying to override the odd/even colors and give the row a ":hover" background color, but I cannot override:

undefined .bwu-datagrid-row.odd, 
.bwu-datagrid-row.odd:not([style-scope]):not(.style-scope) {
    background: #fafafa;
}

Here is what I've tried on my Theme html with no results :

:host::content .bwu-datagrid-row.odd,
.bwu-datagrid-row.odd {
      /* !important works, but it prevents me from doing a :hover */
      background-color: lightskyblue;
      background: lightskyblue;
}

Adding ":hover" to this last rule doesn't get trigger when the row is moused over. I'm hoping that this is possible, so when someone hovers on any cell in a row, the entire row changes background color.

4

1 回答 1

1

inpackage:bwu_datagrid/datagrid/bwu_datagrid_default_them.*是默认的主题样式模块。它应该用作您自己主题的模板。

创建一个具有相同名称的样式模块 ( <dom-module id='bwu-datagrid-default-theme'>,将您想要/需要的内容从随附的默认主题复制到您的自定义主题。
然后只导入您的自定义主题而不是来自的,package:bwu_datagrid/datagrid/并且只会应用您的样式模块中的样式。
这个这样您就不必“对抗”默认主题。

于 2016-03-25T07:09:43.563 回答