More actions
m Replaced em template |
Lord Finnbar (talk | contribs) m →Best practice: Use Wikimarkup and CSS classes in preference to alternatives: Fixed broken links |
||
| Line 214: | Line 214: | ||
=== Best practice: Use Wikimarkup and CSS classes in preference to alternatives === | === Best practice: Use Wikimarkup and CSS classes in preference to alternatives === | ||
In general, styles for tables and other block-level elements should be set using CSS classes, not with inline style attributes. It allows users with very specific needs to change the color schemes in their browser's style sheet. For example, a style sheet at [[Wikipedia:Style sheets for visually impaired users]] provides higher contrast backgrounds for [[Wikipedia:WP:NAVBOX|navboxes]]. The problem is that when the default site-wide classes are overridden, it makes it far more difficult for an individual to choose his/her own theme. | In general, styles for tables and other block-level elements should be set using CSS classes, not with inline style attributes. It allows users with very specific needs to change the color schemes in their browser's style sheet. For example, a style sheet at [[Wikipedia:Wikipedia:Style sheets for visually impaired users|Wikipedia:Style sheets for visually impaired users]] provides higher contrast backgrounds for [[Wikipedia:WP:NAVBOX|navboxes]]. The problem is that when the default site-wide classes are overridden, it makes it far more difficult for an individual to choose his/her own theme. | ||
It also creates a greater degree of professionalism by ensuring a consistent appearance between articles and conformance to a style guide. | It also creates a greater degree of professionalism by ensuring a consistent appearance between articles and conformance to a style guide. | ||
| Line 220: | Line 220: | ||
Regarding accessibility, deviations from standard conventions may be tolerated [[UniWiki:Manual of Style/Accessibility#Color|so long as they are accessible]]. If some template or specific color scheme deviates from the standard, its authors should make sure that it meets accessibility requirements such as providing enough [[Wikipedia:WP:Colour contrast|color contrast]]. For instance, the infoboxes and [[Wikipedia:Template:The Simpsons|navigational templates]] relating to ''[[Wikipedia:The Simpsons|The Simpsons]]'' use a yellow colour scheme, to tie in with the dominant colour in the series. In this case, blue links on yellow provides enough colour contrast, and thus is accessible. | Regarding accessibility, deviations from standard conventions may be tolerated [[UniWiki:Manual of Style/Accessibility#Color|so long as they are accessible]]. If some template or specific color scheme deviates from the standard, its authors should make sure that it meets accessibility requirements such as providing enough [[Wikipedia:WP:Colour contrast|color contrast]]. For instance, the infoboxes and [[Wikipedia:Template:The Simpsons|navigational templates]] relating to ''[[Wikipedia:The Simpsons|The Simpsons]]'' use a yellow colour scheme, to tie in with the dominant colour in the series. In this case, blue links on yellow provides enough colour contrast, and thus is accessible. | ||
In general, articles should use [[Wikipedia:Wikimarkup | In general, articles should use [[Wikipedia:Help:Wikitext|Wikimarkup]] in preference to the limited set of [[Wikipedia:Help:HTML in wikitext|allowed HTML elements]]. In particular, do not use the HTML style elements {{tag|i|o}} and {{tag|b|o}} to format text; it is preferable to use Wiki-markup <code><nowiki>''</nowiki></code> or <code><nowiki>'''</nowiki></code> for purely typographic italicisation and boldfacing, respectively, and use [[Wikipedia:Category:Semantic markup templates|semantic markup templates]] or elements for more meaningful differences. The {{tag|font|o}} element should also be avoided in article text to emphasise logical differences, not just visual ones.. Of course there are natural exceptions; e.g., it may be beneficial to use the {{tag|u}} element to indicate something like an example link that isn't really clickable, but underlining is otherwise generally [[UniWiki:Manual of Style/Text formatting#How not to apply emphasis|not used in article text]]. | ||
=== Users with limited CSS or JavaScript support === | === Users with limited CSS or JavaScript support === | ||