Sergiu Dumitriu wrote:
Anca Paula Luca wrote:
Hi devs,
starting from a Wysiwyg implementation issue, we had a discussion yesterday
about marking links towards new pages in the wiki. Right now, a question mark
('?') text is appended to the end of the link label and coloured properly.
I would like to change this into using exclusively css, for the following reason:
* this question mark represents *styling only*: it's as if we'd colour links
towards new pages with a different color (the way mediawiki does), therefore
this information (either it's a qm, or colour or whatever) should *not appear as
part of the document content*, the way a ? text does (the raw HTML contains it).
One method of doing this in CSS is appending the text itself (with :after
pseudoelement), but that is not cross-browser, and the other method is using an
image for the question mark.
I'm +1 for the image qm for 2 more reasons (besides the cross browser issue):
* this information would not append to document content at all (e.g. if I copied
the rendered document content in an ascii editor, I wouldn't have the ?)
* it is a solution closer to the colour solution or marking the link to a new
page with a non-character sign (see, for example, the way mediawiki marks
external links) -- we can decide to change that anytime and we *don't have to
change rendering rules* which makes very much sense to me.
Here's the issue on JIRA for this solution:
http://jira.xwiki.org/jira/browse/XWIKI-2803
+11 for styling.
+1 for a mixed solution, where an image is used only for stupid browsers
(why do I say browsers? It's only one), and :after is used for the rest
of them.
.createLink {
background:...
padding-right:...
cue-before: url("sayBrokenLink.wav"); /* this is important, too */
}
* > .createLink {
background-image: none;
padding-right: 0;
}
.createLink:after {
content:...
}
The image is not such a great idea because it can't be scaled, it won't
always match the client font, and it won't be displayed when images are
somehow unavailable. If a user has different fonts on his machine, the
qm will look oddly different. If she increases or decreases the font,
the image will stay the same and might even be cropped for smaller font
sizes.
I completely agree, but it just happens to be a question mark to have all these
font problems. It could as well be a whole different marker, which would have no
good reasons to scale with the font or have to match the font.
+ all new browsers have this new zoom-like scaling algo where the images are
scaled with the text ("opera style" or at least that's where I've seen
it
first): FF3, Opera, even the non-browser IE7. don't know about Safari.
If images are disabled, then there's no indication
that the link
is not valid.
The link is valid, they all are (except for externals which we cannot check), it
just does not point to an existing page but to the edit action of a non-existing
page.
I wouldn't even mind if we use :after alone, since I don't give a penny
about IE6 and its users. CSS is cross browser, it just happens that IE
is not really a browser.