SMF Support > SMF 2.0.x Support
Font size by percent issue
Blackylol:
I have seen some users posts in my forums with font bbcode like this
--- Code: ---[size=75%]text[/size]
--- End code ---
but I don't have any mod that does that in percents, I asked some people that done this in their posts and they have no idea why.
the only mod i have modifying posts are
Enhanced Dropdown
WYSIWYG Quick Reply
and ideas why is this happening ?
ziycon:
You can use percentages for font size in SMF, its not a mod, its standard functionality.
Blackylol:
well the problem is that the bbcode is not being processed, you can see the code as part of the text in the final post.
ziycon:
Sorry, that was was incorrect. I saw point and not percentage. Percentage wont work, only pt will, for example .
MrPhil:
The SMF size tag will accept 1-99 pt, 1-99 px, 0.1-9.99 em, small[er], large[r], x[x]-small, x[x]-large, medium, or HTML-style font size number 1 through 7.
CSS permits % as a font-size value, so the parse_bbc() code for the size tag could be extended:
--- Code: --- 'test' => '([1-9][\d]?p[xt]|small(?:er)?|large[r]?|x[x]?-(?:small|large)|medium|(0\.[1-9]|[1-9](\.[\d][\d]?)?)?em)\]',
--- End code ---
to
--- Code: --- 'test' => '([1-9][\d]?p[xt]|small(?:er)?|large[r]?|x[x]?-(?:small|large)|medium|(0\.[1-9]|[1-9](\.[\d][\d]?)?)?em)\]|[1-9][\d]{0,2}%',
--- End code ---
That might work out... possibly the % needs to be escaped \% .
Navigation
[0] Message Index
[#] Next page
Go to full version