Sascha6
(Sascha Robert)
October 2, 2014, 1:31pm
1
Using the new Valo theme I miserably fail to change the default selected table row style.
.v-table tr.v-selected {
background: #466c90;
color: #fff;
}
used to work with Vaadin 6 / Theme Reindeer, but with Valo it doesn’t.
Examining the generated Valo styles.css I tried the following, also without success:
.v-table .v-selected[class*="-row"]
{
background-color: #mySelectionColor;
background-image: none;
background-origin: border-box;
color: $myFontColor;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.05);
}
Changing the default selection color throug $v-selection-color works but has a lot of undesired “side effects”…
Can anybody help?
Best, Sascha
Sascha6
(Sascha Robert)
October 3, 2014, 1:12pm
2
Actually,
.v-table .v-selected[class*=“-row”]
{
background-color: $mySelectionColor;
background-image: none;
background-origin: border-box;
color: $myFontColor;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.05);
}
works. I outsmarted myself with a parentheses mess in my styles.scss.
Cheers, Sascha
jose43
(jose robles)
August 1, 2015, 7:50pm
3
This works except for the font color, do you know why? this is my code:
.v-table-overviewtable .v-selected[class*="-row"]
{
background-color: $divider-color;
background-image: none;
background-origin: border-box;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.05);
}
anezthes
(Joacim Päivärinne)
August 18, 2015, 11:42am
4
Hey Jose,
That should work. What does your browser’s inspector/dev tools say? Is the style overriden? Not applied?
jose43
(jose robles)
August 18, 2015, 2:27pm
5
the inspector say the style is applyed. Maybe this style is overdiding the selected style?
.v-table-cell-content {
color:$secondary-text-color;
font-size:14px;
font-weight:400;
}
Natsumi1
(Natsumi Angel)
May 26, 2017, 6:32pm
7
Hi, everyone!
I found the solution in another blog, you can add style names to your components and then, create custom component-specific selectors without OVERRIDING theme styles, it works:
.v-table tr.v-selected.v-selected {
background: #8A8D8F;
color: #F1F2F4;
}
p.s. it applies for any theme you want to use (I has been using Material Vaadin Theme).
Natsumi1
(Natsumi Angel)
May 26, 2017, 6:36pm
8
This works except for the font color, do you know why? this is my code:
.v-table-overviewtable .v-selected[class*="-row"]
{
background-color: $divider-color;
background-image: none;
background-origin: border-box;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.05);
}
I hope this help to you!
.v-table tr.v-selected.v-selected {
background: #8A8D8F ;
color: #F1F2F4 ;
}