Module talk:Citation/CS1/Feature requests: Difference between revisions

Content deleted Content added
Gadget850 (talk | contribs)
HTML classes: new section
Gadget850 (talk | contribs)
Line 25:
:::I refactored the original proposal to indicate that by ''title'' I meant the main work title. Currently, we have no [[separation of presentation and content]]. That is, the format of the main work title is always italics, and the included work is always in quotes. This presentation should be moved to CSS. Wrapping the main work title in {{tag|cite}} will present the title in italics by default. We can add a class to present the included title in quotes.
:::Since this would be a new feature, I will be moving this to [[Module talk:Citation/CS1/Feature requests]]. --'''''—&nbsp;[[User:Gadget850|<span style="color:gray">Gadget850&nbsp;(Ed)</span>]]'''''<sup>[[User talk:Gadget850|&nbsp;''talk'']]</sup> 18:53, 29 March 2013 (UTC)
::::To expand on [[separation of presentation and content]]: currently the templates include both content and presentation, that is the markup used to style the content as italics, in quotes or bold. Hard coding the presentation means that readers cannot style citations as they desire and it limits template portability. Presentation should be done in CSS. Currently the {{tag|cite|o}} tag has a default style of italics and has the semantic meaning of a title.
::::For an included work title that is presented in quotes, we can create a class with CSS styling. For example the class <code>includedtitle</code>:
{{syntaxhighlight|lang=css|
.includedtitle:before {font-style: normal; content: '\22';}
.includedtitle {font-style: normal;}
.includedtitle:after {font-style: normal; content: '\22';}
}}
::::Then you simply wrap the content in {{tag|cite|params=class="includedtitle"}} causing the font to show as normal and the content wrapped in quotes.
::::{{small|The HTML classes discussion does not include a class for the included work title, so I made up an illustrative class.}} --'''''—&nbsp;[[User:Gadget850|<span style="color:gray">Gadget850&nbsp;(Ed)</span>]]'''''<sup>[[User talk:Gadget850|&nbsp;''talk'']]</sup> 14:58, 30 March 2013 (UTC)
 
== HTML classes ==