Pixate: How to change the background color of the selected tab?
-
21-12-2019 - |
Question
What CSS should I use to change the background color of the selected UITabBarItem using pixate?
I've tried this, and it doesn't seem to work.
tab-bar-item:selected {
background-color: gray;
}
What am I doing wrong?
Solution
For some reason I had to use "tab-bar selection"
I also had to set the background size of it to something reasonable so that it would work. I don't know if this is the way but it works for me.
tab-bar {
background-color: red;
selected-color: white;
}
tab-bar-item {
color: green;
font-family: Arial;
font-size: 12px;
}
tab-bar-item:selected {
color: purple;
}
tab-bar selection {
background-size:64px 48px;
background-color: linear-gradient(red,yellow);
box-shadow: inset 0px 2px 2px rgba(0,0,0,.2);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow