inherit
246561
0
Sept 27, 2024 8:16:30 GMT -8
tomiseksj
61
July 2017
tomiseksj
|
Post by tomiseksj on May 12, 2022 8:11:59 GMT -8
Is there a way to either remove the last 3 font size options (18, 24 and 36 pt) from the pull-down menu or prevent their use?
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on May 12, 2022 17:23:07 GMT -8
The easiest route would be to still allow their use when posting but to ignore them when used (treat them as 14pt if selected to be greater than 14pt). This has the advantage of retroactively working on posts created previous to the new code being installed. The disadvantage is of course it does not account for inline styles and only targets the deprecated font element still generated by the font size dropdown.
Try adding the following to the bottom of your theme's style sheet.
/* Limit size of font elements to only x-small(8pt), small(10pt), medium(12pt) and large(14pt) */ .post.item font[size="1"]{ font-size:8pt } .post.item font[size="2"]{ font-size:10pt } .post.item font[size="3"]{ font-size:12pt } .post.item font[size="4"]{ font-size:14pt } .post.item font[size="5"]{ font-size:14pt } .post.item font[size="6"]{ font-size:14pt } .post.item font[size="7"]{ font-size:14pt }
If you want it active on multiple themes you would need to add it to each theme or put it in your global header.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on May 12, 2022 17:23:07 GMT -8
Is there a way to either remove the last 3 font size options (18, 24 and 36 pt) from the pull-down menu or prevent their use?
Try adding this to your forum's CSS Styling..
.button-fontSize ul li:nth-last-of-type(1) { display: none; } .button-fontSize ul li:nth-last-of-type(2) { display: none; }
Ooops, Chris beat me with a better solution..
|
|
inherit
246561
0
Sept 27, 2024 8:16:30 GMT -8
tomiseksj
61
July 2017
tomiseksj
|
Post by tomiseksj on May 12, 2022 17:54:04 GMT -8
Thanks for the help - I'll give it a try in the morning!
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on May 12, 2022 19:07:02 GMT -8
The two can be combined to remove from the dropdown (to show that there are now fewer choices) as well as retroactively disable the large-sized fonts from displaying properly /* Limit size of font elements to only x-small(8pt), small(10pt), medium(12pt) and large(14pt) */ .post.item font[size="1"]{ font-size:8pt } .post.item font[size="2"]{ font-size:10pt } .post.item font[size="3"]{ font-size:12pt } .post.item font[size="4"]{ font-size:14pt } .post.item font[size="5"]{ font-size:14pt } .post.item font[size="6"]{ font-size:14pt } .post.item font[size="7"]{ font-size:14pt } .button-fontSize ul li:nth-last-of-type(-n+3) { display: none; }
|
|
inherit
246561
0
Sept 27, 2024 8:16:30 GMT -8
tomiseksj
61
July 2017
tomiseksj
|
Post by tomiseksj on May 13, 2022 4:10:12 GMT -8
Thanks to both of you!
|
|