Remove the space an icon takes up on the screen

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
jeroenb42
Posts: 12
Joined: Wednesday 09 May 2018 10:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Remove the space an icon takes up on the screen

Post by jeroenb42 »

I have some MiFlora devices and I want to show the values of each of them in a row. I can manage that easily but I'm running out of space. I want to remove the space that the icon takes up (if it says 100 lux I know what it is). If have tried making the icons all empty and I have tried with css but I cannot figure it out. I have tried using an icon which I don't use in other places and make the width of that 1 px in css but that also does not work. Is there any trick I can use?
jeroenb42
Posts: 12
Joined: Wednesday 09 May 2018 10:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Remove the space an icon takes up on the screen

Post by jeroenb42 »

I have figured it out so let me share it.
There are 2 parts to it, the icon itself and the div surrounding it.
In my example, I have a text sensor for which I only want to show the text itself and don't care about the icon.
The Domoticz id in my example is 1260. The relevant CONFIG.js section:
blocks[1260] = {}
blocks[1260]['width'] = 2;
blocks[1260]['title'] = '';
blocks[1260]['last_update'] = false;
blocks[1260]['protected'] = true;
I did not set a specific icon to customize. The default icon I found is the file icon.
The relevant custom.css section:
.fas.fa-file.icon { font-size:0.5px !important; width:1px !important; }
div[data-id="1260"] div.col-xs-4 { font-size:0.5px; width:1px !important; }

The result, the icon is so small you don't see it and the width is only 1 px.
EastXIII
Posts: 29
Joined: Monday 08 October 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Remove the space an icon takes up on the screen

Post by EastXIII »

Nice. Thanks for this. Is setting to 0px not an option? That's how I removed some titles.
What does the 'protected' addition do?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest