Wedge
Public area => Bug reports => The Pub => Archived fixes => Topic started by: xrunner on May 5th, 2013, 01:27 AM
-
Norticed when mucking with my profile. When I added a color it changed the color but added three dots in front of the text.
Atheist Think Tank(http://www.atheistthinktank.net/thinktank/index.php)
[url=http://www.atheistthinktank.net/thinktank/index.php]Atheist Think Tank[/url]
Atheist Think Tank(http://www.atheistthinktank.net/thinktank/index.php)
[url=http://www.atheistthinktank.net/thinktank/index.php][color=teal]Atheist Think Tank[/color][/url]
-
Put the colour outside the link rather than inside. It's a side effect of the shortening facility we have for links:
[color=teal][url=http://www.atheistthinktank.net/thinktank/index.php]Atheist Think Tank[/url][/color]
Atheist Think Tank(http://www.atheistthinktank.net/thinktank/index.php)
:edit: Huh. That doesn't work. Time for plan B.
@Nao Yay for styling that auto link shortener in CSS.
-
Put the colour outside the link rather than inside. It's a side effect of the shortening facility we have for links:
[color=teal][url=http://www.atheistthinktank.net/thinktank/index.php]Atheist Think Tank[/url][/color]
Atheist Think Tank(http://www.atheistthinktank.net/thinktank/index.php)
Ah OK, I was doing it the way I've always done it elsewhere. :)
-
See my edited post ;)
-
Yes sir. :)
-
@Nao Yay for styling that auto link shortener in CSS.
Actually, it's not the link shortener that's changing the style, it's the .bbc_link class, which is shown on all parsed links...
Hmm, I don't know how to 'fix this'... (Does it REALLY need fixing..? :^^;:)
Taking apart the cool existing code to add some stuff to remove BBC tags from the char counter...? (Hmm, I don't even remember how I did that one...)
-
Right, let me explain the problem here.
url inside a color tag doesn't work.
color inside a url tag adds a spurious ... to it because of the .bbc_link span styling. It's not based on the number of characters as far as I can tell because the ... is prepended and is straight-up because of the fact it's a .bbc_link containing a span.
One of these two needs to be fixed, whichever one we don't fix, we add a rule to bbc parsing to prevent.
-
It's not a JS problem... Thought so.
In fact, it's just something that happens even with JS disabled.
This is due to this rule:
.bbc_link span:before
Uh...
I guess I should be doing something like using a specific class for it. Don't like the idea, as it costs more bytes in JS, but... whatever.
-
So, I fixed it in two different ways...
- a CSS-only fix, doesn't work in IE 6-8 (it'll still work -- just not that particular bug.)
- a JS+CSS fix, works everywhere.
CSS version adds 12 bytes to CSS file, and 0 byte to JS file.
JS version adds 1 byte to CSS file, and 6 bytes to JS file.
JS version seems like a no-brainer, but I prefer adding bytes to CSS (= doesn't stall page loading), and it's easier to save bytes in CSS than in JS, because the JS file is already optimized for size, and by a wide margin...
Any opinions...?
PS: that particular link brings back bad memories... >_<
-
I'd rather have the CSS+JS solution personally. IE8 is still around and as the highest version supported by XP, it's not something we can easily ignore at this stage.
While it adds JS bytes, it's adding a total of 7 bytes to something that will likely be cached with the user in most cases anyway.