[xwiki-devs] [proposal] Use exclusively css to mark links towards new pages
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 WDYT? Happy coding, Anca Luca
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 ?)
afaik the content of :after is not copied.
* 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
WDYT?
+1 for using style (? is not part of the content for sure, but part of the presentation). +0 for using an image (I'd prefer the :after but since IE doesn't support it I'm fine with the image).
Happy coding, Anca Luca _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Nov 4, 2008, at 12:52 PM, 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:
strong +1
* 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.
+1 for image since it's also cross browser I believe. Thanks -Vincent
Here's the issue on JIRA for this solution: http://jira.xwiki.org/jira/browse/XWIKI-2803
WDYT?
Happy coding, Anca Luca
big +1, the simple fact that the ways it works currently make it impossible to change "?" by something else just by skinning is already enough for me to change it. On Tue, Nov 4, 2008 at 12:52 PM, Anca Paula Luca <[email protected]> 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
WDYT?
Happy coding, Anca Luca _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Tue, Nov 4, 2008 at 12:52 PM, Anca Paula Luca <[email protected]> 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
+1
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.
+1 for the image qm. Being able to fine tune the way links are visualy rendered could lead to other improvements : - difference between internal and external links <span class="external"> (see http://www.dokuwiki.org/dokuwiki for example) - information about the internal pages <span class="internal XWiki_XWikiArticleClass"> - etc. JV.
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. If images are disabled, then there's no indication that the link is not valid. 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. -- Sergiu Dumitriu http://purl.org/net/sergiu/
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.
Anca Paula Luca wrote:
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.
New browsers are not the problem here... But yes, we could use other images, not just a QM, to distinguish between different kinds of link targets. That's up to the skin.
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.
Yes, wrong words, but that's what I meant.
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. -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (6)
-
Anca Paula Luca -
Jean-Vincent Drean -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol