Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2406

[3.3.x] Styles Support & Discussion • Re: fa-institution vs fa-home

$
0
0
Here's another trick. The default phpBB CSS for the icon class is this:

Code:

.icon, .button .icon, blockquote cite:before, .uncited:before {display: inline-block;  font-family: FontAwesome;  font-weight: normal;  font-style: normal;  font-variant: normal;  font-size: 14px;  line-height: 1;  text-rendering: auto; /* optimizelegibility throws things off #1094 */  -webkit-font-smoothing: antialiased;  -moz-osx-font-smoothing: grayscale;}
Most of this is fine IMO, but it benefits from a couple of tweaks.

Code:

.icon, .button .icon {display: inline-block;  font-weight: 400;  font-style: normal;  font-variant: normal;  font-family: FontAwesome;  font-size: inherit;  line-height: inherit;}
The main points here are the font-size and line-height. Setting them to inherit seems to give better overall results, because funnily enough it means the icons start out matching the associated text for size and line-height. In some places it can also be an advantage to set .icon width to auto, to override the default .fa-fw class that sets width to 1.28...em (which is 16px, when combined with the default 14px size). Also, if you want it centred, you might want to override this too:

Code:

.icon::before {  padding-right: 2px;}
TBH I think FA is a fairly mediocre set, because the icons are not consistent in size or visual weight, but I haven't bothered looking for a better alternative yet.

Statistics: Posted by Gumboots — Tue Apr 01, 2025 8:27 pm



Viewing all articles
Browse latest Browse all 2406

Trending Articles