Trying to write a widget for openHAB (user UI is based on F7-framework), I added a stylesheet for slider element like this:
stylesheet: >
.range-knob {
width: 180px;
height: 70px;
translate: -50% -85%;
clip-path: path('M180.3,35.5c-59.2,0-56.3-35-92.4-35s-31.9,35-87.6,35h0.2c55.9,0,51.7,35,87.6,35S121.1,35.5,180.3,35.5')!important;
background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 36.9 36.9' style='enable-background:new 0 0 36.9 36.9;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23004BAD;%7D .st1%7Bfill:%2364B5F6;%7D .st3%7Bfont-family:'ArialMT';%7D .st4%7Bfont-size:12px;%7D%0A%3C/style%3E%3Cpath class='st0' d='M0,18.4C0,8.3,8.3,0,18.4,0s18.4,8.3,18.4,18.4s-8.3,18.4-18.4,18.4S0,28.6,0,18.4z'/%3E%3Cg%3E%3Cpath class='st1' d='M29.2,22.2c0-5.7-10.7-19.6-10.7-19.6S7.7,16.5,7.7,22.2s4.8,10.4,10.7,10.4S29.2,27.9,29.2,22.2z'/%3E%3Cpath class='st1' d='M18.1,28.8c-3.5,0-6.4-2.8-6.4-6.2c0-1,0.8-1.8,1.8-1.8s1.8,0.8,1.8,1.8c0,1.5,1.2,2.7,2.8,2.7 c1,0,1.8,0.8,1.8,1.8C19.9,28,19.1,28.8,18.1,28.8z'/%3E%3C/g%3E%3Ctext transform='matrix(1 0 0 1 12.9397 27.1544)' class='st0 st3 st4'%3E%25%3C/text%3E%3C/svg%3E%0A")!important;
background-position: center!important;
background-repeat: no-repeat!important;
background-size: 30%;
}
And it worked, but not for Android platform, where another style applies on top of mine: Screenshot from mobile browser
.md .range-slider-min:not(.range-slider-dual) .range-knob {
background: #fff!important;
border: 2px solid var(--f7-range-bar-bg-color);
}
making background image disappear. How can I get rid of this style?
As you can see, I tried to use !important in my stylesheet, but still they are overrided.