[WIKI] List of working CSS code, verified on SharpTools

This is a community maintained wiki of Custom CSS code snippets that have been tested as working on Sharptools. CSS snippet lines can be added to the bottom of your Theme. Feel free to edit this wiki post or reply in the thread with your examples.

Adjust the title text line spacing

Default is 150% and 100% = no space

.tile .title { line-height: 100%; }

Adjust the footer text line spacing

Default is 150% and 100% = no space

.tile .tile-footer { line-height: 100%; }

Center align the footer

Needs both lines. Doesn’t cover all tiles, but works pretty well.

.tile .tile-footer { text-align: center; }
.tile .tile-footer .status span.right { float: inherit!important; }

Remove green “Command Sent” pop-up

.toast.green{ display: none; }

Title Text Shadow

Remove the shadow on Media Tiles (and other potential tiles)

.tile .title { text-shadow: none; } 

Adjust clock / calendar / news-feed tile fonts

.tile.clock .time { font-size: 1.8em; } .date { font-size: 2em; }
.tile.calendar.agenda .main-content { font-size: 1.75em; }
.tile.news-feed .main-content { font-size: 1.75em; } 

Adjust the margins on top/bottom or left/right

Make the top/bottom and side margins symmetrical or indiviually adjust using em or other

.grid.dashboard { margin-top:0; margin-bottom:0; }
.force-full-width, body div#app div.container.full-width { padding-left:0; padding-right:0; }

Change icon size for tiles

Change the default icon size for tiles. 50% being the base, teh example below reduces the size by 15% to 35% total

.tile .icon svg {width: 35%; height: 35%; margin: 0; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);}

Change Numeric Variable Content Size

The default size is ‘3’, so a value of ‘6’ should double the size:

.tile.variable.variable-number .main-content > span { font-size: 6em;  }
7 Likes

Some examples here…

This is a great idea. A list of snipets and a description of what they do would be a nice resource.

@kampto if you’d like me to, I can make the first post of this thread a Wiki so anyone can edit it?

Yes, that would be great. I tried to put some space inbetween the description and the snippet but cant seem to do it.

The best way to do it is to either wrap the CSS part in triple backticks ``` or to highlight the block of CSS text and tap the </> button in the forum’s editor toolbar:

So the following text that is entered (screenshotted):

image

Would become:

.tile .title { line-height: 100%; }

OK. I turned the first post into a wiki and updated the formatting a bit. Feel free to adjust as you see fit though! :smiley:

Added footer line spacing

1 Like

Added margin adjust to top/bottom or left/right

1 Like

Hi all, this CSS editing is a lovely touch. Fine tuning my dashboards and they’re looking better than ever.

Can someone possible assist me with adjusting the calendar main body font size? The font for my actual calendar events is very very small. The tile itself it fairly large and header is a good size font

Thanks for help.

Try these, and you may adjust the font-size that fits you the best.

.tile.calendar.agenda .main-content { font-size: 1.75em; }
.tile.news-feed .main-content { font-size: 1.75em; } 

Please note these CSS snippets provided are not officially supported and you may have to adjust them if there are DOM changes with future releases

-EDIT-
Updated the css slightly to apply the font size change to the whole agenda content, as well as including the font-size change for news-feed tile.

1 Like

Thanks for sharing. It now looks much better and I’ve noted the caveats for future development.

:slight_smile:

Added these to the wiki

1 Like

Would like to know a way to remove padding on icons using CSS.

Need to make them as large as possible, and don’t need padding since using transparent tile.

Thanks!

1 Like

CSS for adjusting icon size (which I find the default size a bit too imposing). If you consider 50% being the default size for the CSS below then I use 35% as a bit smaller icon which I find much more aesthetic. Adjust percentages to your taste…

.tile .icon svg {width: 35%; height: 35%; margin: 0; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);}

I also added to the wiki. CSS can likely be shortened but I kinda like it in full form to play around with any of the related attributes.

1 Like

I usually just target the font size of the icon. It looks like the icons are usually 4em by default, so I just adjust from there.

Half size: (2 / 4)

.tile .icon svg { font-size: 2em; } 

25% bigger (5 / 4):

.tile .icon svg { font-size: 5em; } 

I was trying to figure out why you had all the other stuff with positioning in your example since the icons are already centered, but I guess once you make the icons so big that they go out of their bounding box, the extra centering can help force them back to center.

4 Likes

Does anyone know syntax for header or title font upsizing? since the scalable updates I cannot read or update the tile title sizes. I did fix the calendar content size with the CSS per guidance above.

thanks, Mark

You can adjust it in the theme. It’s listed as “Header Font Size” toward the bottom of the customizations. You can choose the ‘Custom’ size and then input whatever percentage you want like 200%

2 Likes

Thank you for that; seems to work with a little trial and error. I had tried the largest non custom size and didn’t see any movement. I am assuming the theme solution is the only way to modify dashboard tile font size (for icon hero types) if scalable method is used? thanks again.

.tile .title { font-size: <specify size in points or em units>; }
-and-
.tile .title-footer { font-size: <specify size in points or em units>; }

should to the trick
Note: if you don’t see any changes, you may need to add !important clause before the semicolon to force these styles to override other definitions
Example:
.tile .title { font-size: 2.5em !important; }