@@ -132,7 +132,7 @@ export class CanvasGaugeCard extends LitElement {
132132 ? config . card_height
133133 : config . gauge [ "height" ] ;
134134
135- this . _shadowHeight = config . shadow_height ? config . shadow_height : "10 %" ;
135+ this . _shadowHeight = config . shadow_height ? config . shadow_height : "0 %" ;
136136 this . _useDropshadow = config . dropshadow ? config . dropshadow : false ;
137137
138138 this . _fontSize = config . font_size
@@ -204,7 +204,7 @@ export class CanvasGaugeCard extends LitElement {
204204 ? this . _config . background_color
205205 : "transparent" } !important ;
206206 }
207- # cardroot {
207+ . cardroot {
208208 width : ${ this . _gaugeWidth } px;
209209 height : calc (
210210 ${ this . _gaugeHeight } px +
@@ -213,28 +213,29 @@ export class CanvasGaugeCard extends LitElement {
213213 position : relative;
214214 margin : auto;
215215 }
216- # container {
216+ . container {
217217 width : ${ this . _gaugeWidth } px;
218218 height : ${ this . _gaugeHeight } px;
219219 position : relative;
220220 top : 0px ;
221221 overflow : hidden;
222222 text-align : center;
223223 }
224- # innercontainer {
224+ . innercontainer {
225225 position : relative;
226226 top : ${ this . _config . card_top ? this . _config . card_top : 0 } ;
227227 left : ${ this . _config . card_left ? this . _config . card_left : 0 } ;
228228 }
229229 .shadow {
230+ visible : ${ this . _shadowHeight == "0%" ? `none` : `block` } ;
230231 width : 100% ;
231232 height : ${ this . _shadowHeight } ;
232233 left : 0px ;
233234 bottom : 0px ;
234235 background : rgba (0 , 0 , 0 , 0.5 );
235236 position : absolute;
236237 }
237- # state {
238+ . state {
238239 position : relative;
239240 float : left;
240241 top : 50% ;
@@ -244,23 +245,23 @@ export class CanvasGaugeCard extends LitElement {
244245 transform : translate (-50% , -50% );
245246 }
246247 </ style>
247- <div id = "cardroot" >
248+ <div class = "cardroot" >
248249 <div
249- id = "container"
250+ class = "container"
250251 width = ${ this . _gaugeWidth }
251252 height= ${ this . _gaugeHeight }
252253 >
253254 <div
254- id = "innercontainer"
255+ class = "innercontainer"
255256 width = ${ this . _gaugeWidth }
256257 height= ${ this . _gaugeHeight }
257258 @click = ${ this . clickHandler }
258259 >
259260 <canvas id= "canvaselement" > </ canvas>
260261 </ div>
261262 </ div>
262- <div id = "shadow" >
263- <div id = "state" style = "font-size: ${ this . _fontSize } " >
263+ <div class = "shadow" >
264+ <div class = "state" style = "font-size: ${ this . _fontSize } " >
264265 ${ this . _config . name }
265266 </ div>
266267 </ div>
0 commit comments