Why not allow either?imkingdavid wrote:What if someone wants to have text at 125%? This new way would not allow that, since the only options would be 85%, 100%, 150%, and 200%. Also, this would need the font bbcode input to change from number to word (small, huge, etc.).
Replace font size BBCodes' inline HTML with CSS
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: Replace font size BBCodes' inline HTML with CSS
- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: Replace font size BBCodes' inline HTML with CSS
So rather than removing the style="font-size:#%" attribute, you want to add a class to the default five font sizes. I'm not sure how possible this is in the current BBCode parser, but I suppose I could support that, assuming I would still be able to specify a non-default size.
- Pony99CA
- Registered User
- Posts: 986
- Joined: Sun Feb 08, 2009 2:35 am
- Location: Hollister, CA
- Contact:
Re: Replace font size BBCodes' inline HTML with CSS
First, I would name the classes something likeecwpa wrote:I'm not sure how many users use custom sizes but I bet most of them just use the 5 sizes labeled as as tiny, small, normal, big and huge. I'd like to have some control over those 5 only, just adding a class to the inline code would be enough for me and even theme designers.
So, It could look like this:
Code: Select all
<span style="font-size: 85%;" class="small-text">Small</span>
Code: Select all
.small-text { line-height: normal"; }
.bbcode-size-small
to make sure nobody confused them with other style elements in phpBB and to make the mapping between BBCode tag and class more obvious.Second, I would expand this suggestion to other formatting tags. For example, if somebody used the B tag, I might want to control the font weight myself or if somebody used the U tag, I might want to use double underlining to prevent people from thinking it was a link.
That said, if we convert all standard BBCodes to Custom BBCodes, this may become moot. The admin will be able to control the default BBCodes through the ACP, albeit not in a style-dependent manner.
Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
-
- Registered User
- Posts: 523
- Joined: Sat Apr 22, 2006 10:29 pm
- Contact:
- EXreaction
- Registered User
- Posts: 1555
- Joined: Sat Sep 10, 2005 2:15 am
Re: Replace font size BBCodes' inline HTML with CSS
I would hope by 3.2 we have all custom bbcodes and unless someone is planning on creating a PR for this very soon it probably will not make it into 3.1. So I would say if someone is really interested in this until bbcodes are replaced with all custom bbcodes, I would suggest they change the code to do this and submit a PR within the next week.
If someone submits a PR soon enough and lets me know, I will review it so it can make it into 3.1.
If someone submits a PR soon enough and lets me know, I will review it so it can make it into 3.1.
- DionDesigns
- Registered User
- Posts: 51
- Joined: Sat Apr 21, 2012 4:29 am
- Location: Uncertain due to momentum
- Contact:
Re: Replace font size BBCodes' inline HTML with CSS
How would the "Maximum font size per post" setting (ACP Post Settings) work if the sizes were changed to classes?
Re: Replace font size BBCodes' inline HTML with CSS
I believe the idea is to now just add a class as well to the tag for the 5 basic sizes so that further styling could be applied to the 5 basic settings as these are the ost commonly used