https://bugzilla.wikimedia.org/show_bug.cgi?id=54604
--- Comment #70 from Roan Kattouw <roan.katt...@gmail.com> --- (In reply to Gabriel Wicke from comment #69) > One issue I didn't mention yet is editor complexity. Every editor for our > HTML including VE will need to replicate the class logic from the parser. > This includes future micro-contribution tools like 'fix this link'. It seems > likely that this will lead to rendering inconsistencies when the logic > replication is not perfect. This is also a problem for VisualEditor. Even in the current system, not including any micro-contribution tools that Gabriel talks about, we would need three entirely separate copies of this logic, in: * MediaWiki's wikitext->HTML parser * Parsoid, to generate correct HTML * VisualEditor, to display newly created links correctly VE generally deals well with styling that comes from the parser side and displays it correctly, but in this case the user could create a link entirely from scratch, and that link might be a .pdf link. Then even though there may not be another .pdf link anywhere on the page, we still need to know that .pdf is magical and should trigger a certain CSS class in order to produce the correct rendering. That's why we need a full duplicate of the icon logic. So in general, we try to move this kind of logic fully *into* CSS, rather than *out of* CSS and into *code*. Last year this was done for auto-numbered external link numbering: instead of implementing a bunch of numbering logic both in Parsoid and in VE, we were able to number them entirely in CSS using CSS3 counters. With that in mind, I would much prefer that link icons be done in pure CSS, with attribute selectors in their full "glory". That way VisualEditor and any other clients that need to generate new HTML will not have to reimplement the logic from scratch, and instead will just be able to load the CSS. Unless attribute selectors are horrendously slow (which they're probably not, the original CSS rules for link icons date back to 2004), moving to classes just makes things worse, not better. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l