Replace font size BBCodes' inline HTML with CSS

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
User avatar
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

Post by callumacrae »

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.).
Why not allow either?
Made by developers, for developers!
My blog

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: Replace font size BBCodes' inline HTML with CSS

Post by imkingdavid »

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.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
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

Post by Pony99CA »

ecwpa 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"; }
First, I would name the classes something like .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.


User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: Replace font size BBCodes' inline HTML with CSS

Post by EXreaction »

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.

User avatar
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

Post by DionDesigns »

How would the "Maximum font size per post" setting (ACP Post Settings) work if the sizes were changed to classes?

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: Replace font size BBCodes' inline HTML with CSS

Post by hanakin »

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
Donations welcome via Paypal Image

Post Reply