Internet Architecture Board (IAB) H. FlanaganInternet-DraftRequest for Comments: 7993 RFC EditorIntended status:Category: InformationalJuly 4,November 2016Expires: January 5, 2017 CSSISSN: 2070-1721 Cascading Style Sheets (CSS) Requirements for RFCsdraft-iab-rfc-css-01Abstract The HTML format forRFCs, described in [I-D.iab-html-rfc]RFCs assigns style guidance toan RFC Editor-defineda Cascading Style Sheet(CSS).(CSS) specifically defined for the RFC Series. The embedded, default CSS as included by the RFC Editor is expected to take into account accessibility needs and to be built along a responsive design model. This document describes the requirements for the default CSS used by the RFC Editor. The class names are based on the classes defined indraft-iab-html-rfc. Discussion of this draft takes place on the rfc-interest mailing list (rfc-interest@rfc-editor.org), which has its home page at https://www.rfc-editor.org/mailman/listinfo/rfc-interest."HTML for RFCs" (RFC 7992). Status of This Memo ThisInternet-Draftdocument issubmitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documentsnot an Internet Standards Track specification; it is published for informational purposes. This document is a product of the InternetEngineering Task Force (IETF). NoteArchitecture Board (IAB) and represents information thatother groups may also distribute working documents as Internet-Drafts. The listthe IAB has deemed valuable to provide for permanent record. It represents the consensus ofcurrent Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents validthe Internet Architecture Board (IAB). Documents approved for publication by the IAB are not amaximumcandidate for any level ofsix monthsInternet Standard; see Section 2 of RFC 7841. Information about the current status of this document, any errata, and how to provide feedback on it may beupdated, replaced, or obsoleted by other documentsobtained atany time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on January 5, 2017.http://www.rfc-editor.org/info/rfc7993. Copyright Notice Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document.Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Design Goal . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. General Requirements . . . . . . . . . . . . . . . . . . . .43 4. Page Layout . . . . . . . . . . . . . . . . . . . . . . . . . 4 4.1. Title Page Header . . . . . . . . . . . . . . . . . . . . 4 4.2. Body . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4.3. Font Choices . . . . . . . . . . . . . . . . . . . . . . 4 5. Printing . . . . . . . . . . . . . . . . . . . . . . . . . .54 6. Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 7. CSS Classes and Attributes . . . . . . . . . . . . . . . . . 5 7.1. .alignCenter . . . . . . . . . . . . . . . . . . . . . . 5 7.2. .alignRight . . . . . . . . . . . . . . . . . . . . . . . 5 7.3. .artwork . . . . . . . . . . . . . . . . . . . . . . . . 5 7.3.1. .art-ascii-art . . . . . . . . . . . . . . . . . . .65 7.3.2. .art-logo . . . . . . . . . . . . . . . . . . . . . .65 7.4. .cref . . . . . . . . . . . . . . . . . . . . . . . . . .65 7.5. .crefAnchor . . . . . . . . . . . . . . . . . . . . . . . 6 7.6. .crefSource . . . . . . . . . . . . . . . . . . . . . . . 6 7.7. .dlCompact . . . . . . . . . . . . . . . . . . . . . . . 6 7.8. .dlHanging . . . . . . . . . . . . . . . . . . . . . . . 6 7.9. .dlParallel . . . . . . . . . . . . . . . . . . . . . . . 6 7.10. .docInfo . . . . . . . . . . . . . . . . . . . . . . . . 6 7.11. .eref . . . . . . . . . . . . . . . . . . . . . . . . . .76 7.12. .finalized . . . . . . . . . . . . . . . . . . . . . . .76 7.13. .note . . . . . . . . . . . . . . . . . . . . . . . . . .76 7.13.1. .rfcEditorRemove . . . . . . . . . . . . . . . . . .76 7.14. .olCompact . . . . . . . . . . . . . . . . . . . . . . . 7 7.15. .olPercent . . . . . . . . . . . . . . . . . . . . . . . 7 7.16. .pilcrow . . . . . . . . . . . . . . . . . . . . . . . . 7 7.17. .relref . . . . . . . . . . . . . . . . . . . . . . . . . 7 7.18. .rendered . . . . . . . . . . . . . . . . . . . . . . . . 7 7.19. .sourcecode . . . . . . . . . . . . . . . . . . . . . . .87 7.20. .toc . . . . . . . . . . . . . . . . . . . . . . . . . .87 7.21. .type . . . . . . . . . . . . . . . . . . . . . . . . . .87 7.22. .ulCompact . . . . . . . . . . . . . . . . . . . . . . . 8 7.23. .ulEmpty . . . . . . . . . . . . . . . . . . . . . . . . 8 7.24. .url . . . . . . . . . . . . . . . . . . . . . . . . . . 8 7.25. .xref . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 9.IANA Considerations . . . . . . . . . . . . .References . . . . . . . .8 10. Acknowledgements. . . . . . . . . . . . . . . . . 8 9.1. Normative References . . . . .9 11. Draft Change Log. . . . . . . . . . . . . 8 9.2. Informative References . . . . . . . . .9 11.1. Changes from draft-iab-rfc-css-00 to -01. . . . . . . . 911.2. Changes from draft-flanagan-rfc-css to draft-iab-rfc-css 9 11.3. Changes from -02 to -03 . . . . . . . . . . . . . .Appendix A. List of Classes . .9 11.4. Changes from -01 to -02. . . . . . . . . . . . . . . . 911.5. Changes from -00 to -01 . . . . . . . . . . . . . . .IAB Members at the Time of Approval .9 12. Normative References. . . . . . . . . . . . . . 12 Acknowledgements . . . . . .10 Appendix A. List of classes. . . . . . . . . . . . . . . . . .1013 Author's Address . . . . . . . . . . . . . . . . . . . . . . . .1413 1. Introduction The HTML format for RFCs, described in[I-D.iab-html-rfc][RFC7992], assigns style guidance toan RFC Editor-defineda Cascading Style Sheet(CSS).(CSS) specifically defined for the RFC Series. This CSS will be embedded in the published HTML, and it may be overridden by a locally definedCSSCSS, as desired. The embedded, default CSS as included by the RFC Editor is expected to take into account accessibility needs and to be built along a responsive design model. This document describes the requirements for the default CSS used by the RFC Editor. Unless called out otherwise, any styling provided for these classes must not alter the natural language content in any visible way. Many of these classes are provided to mark the elements semantically: elements using them should simply inherit their surrounding styling. Exceptions arecalled outlisted below. A class is identified forInternet Drafts,Internet-Drafts, such that certain features found only in I-Ds may be made distinct in some fashion within those drafts. The requirements will only be applied to HTML documents published by the RFC Editor as per[I-D.iab-rfc-framework].[RFC7990]. The detailsdescribedincluded in this document are expected to change based on experience gained in implementing theRFC production center's toolset.new publication toolsets. Revised documents will be published capturing those changes as thetoolset istoolsets are completed. Other implementers must not expect those changes to remainbackwards-compatiblebackwards compatible with the detailsdescribedincluded in this document. 2. Design Goal RFCs must be adaptable to a wide variety of devices and displays, accessible to assisted readers, and printable. 3. General Requirements o Support the display of the semantic HTML described in[I-D.iab-html-rfc].[RFC7992]. o Follow best practice for accessibility, as defined by the W3C's "Best Practices for Authoring HTML" [HTMLBP]. o Follow best practice for mobile devices, as defined by the W3C's "Best Practices for AuthoringHTML."HTML". o Allow for a broad range of internationalized scripts. 4. Page Layout 4.1. Title Page Header The document header must be at the top of the document and include all information described inthe "Style"RFC Style Guide" [RFC7322] and "RFC Streams, Headers, and Boilerplates"[RFC7322] [RFC5741][RFC5741]. 4.2. Body The body of the document must conform to the following: o Examples and code blocks must be in a fixed-width font o ASCII art must be in a fixed-width font o Reflow the text as the screen gets smaller and limit max width o Block quotes must be indented o Tables must allow for distinct header rows o Paragraphs should include a hover-over paragraph identifier All anchor tags and URLs should be clearly distinguished as links, forexampleexample, through the use of color and/or text decoration, following appropriate accessibility standards. 4.3. Font Choices o Default to a sans-serif font family with broad Unicode support for web browser viewing. o Default to a serif font family with broad Unicode support for printing. o A fixed-width font must be used for code and artwork-tagged sections. o All fonts should be publicly licensed and supported by all major web browsers. 5. Printing The CSS must include support for a printer-friendly output. The print rules should be a part of the embedded style sheet; consumers of an RFC may develop their own print-specific stylesheetsheet, as desired. 6. Lists Lists should provide ample whitespace between list elements for legibility unless a 'compact' class is specified (e.g., .dlCompact, .ulCompact, .olCompact). 7. CSS Classes and Attributes This section describes the CSS classes that result in specific changes to the natural language content of a document. A full list of available classes, not including basic selectors,areis included in"Appendix A".Appendix A. 7.1. .alignCenter To be used with '.artwork' to indicate the figure should align in the center of the page flow. 7.2. .alignRight To be used with '.artwork' to indicate the figure should align on the right of the page flow. 7.3. .artwork These classes will mostly be styled as part of.artwork.'.artwork'. Specific classes may include '.art-ascii-art' and '.art-svg'. Artwork will be held in its own block of space, centered in the page flow, and will not float. Images should have a max width of 100% so views will scale properly across a variety of screens and devices. 7.3.1. .art-ascii-art Must use a mono-spaced font. 7.3.2. .art-logo No visible changes to the natural language content; keep in default style. Note that such images are not currently allowed in RFCs. 7.4. .cref A comment within an I-D; should be visually distinct. For I-Ds only; not for RFCs. 7.5. .crefAnchor A comment within an I-D; should be visually distinct. For I-Ds only; not for RFCs. 7.6. .crefSource A comment within an I-D; should be visually distinct. For I-Ds only; not for RFCs. 7.7. .dlCompact Use less spacing on a definition list than the default. 7.8. .dlHanging Use the standard hanging indent for a definition list; indent terms. 7.9. .dlParallel Do not use the standard hanging indent for a definition list; align terms and definitions along left side. 7.10. .docInfo Hide from visible content. 7.11. .eref Standard link formatting (underlined, change in color). 7.12. .finalized Hide from visible content. 7.13. .note Notes should be emphasized and distinct from normal paragraph text. 7.13.1. .rfcEditorRemove An RFC Editor note may be added after the standardboilerplage.boilerplate. It should be visually distinct to highlight final removal of the note by the RFC Editor. 7.14. .olCompact Use less spacing on a numbered list than the default. 7.15. .olPercent If the style attribute from the source XML contains a percent sign, a particular style setting will be required to make this setting behave like an HTML ordered list. 7.16. .pilcrow Pilcrows, when used as described indraft-iab-html-rfc,RFC 7992, should appear at the end of the paragraph, artwork, or sourcecode segment. They should not appear until moused-over. They should not show when printed, and they should not be selected when copied with a copy/paste function. 7.17. .relref Should be clearly distinguished as links. 7.18. .rendered Hide from visible content. 7.19. .sourcecode Code examples or components should be in a fixed-width font if the human language used has an available fixed-width font option, and they should be visually distinct. If no fixed-width font is available, use the default font for that human language. 7.20. .toc The table of contents should be clearly distinguished using an indented, ordered list with the list style set to 'none', allowing for hyperlinked, in-line dotted number notation (e.g., 1., 1.1., 1.1.1.). 7.21. .type No visible changes to the natural language content; keep in default style. 7.22. .ulCompact Use less spacing on a bulleted list than the default. 7.23. .ulEmpty Indent from the margin of the previous paragraph. 7.24. .url Should be clearly distinguished as links. 7.25. .xref Should be clearly distinguished as links. 8. Security Considerations Security vulnerabilities can be introduced through theCSS. How much detail do we need to go into here to say "don't do foolish things and introduce security issues?" 9. IANA Considerations This draft contains no action for IANA 10. Acknowledgements With many thanks to the RFC Format Design Team for their efforts in making this transition successful: Nevil Brownlee (ISE), Tony Hansen, Joe Hildebrand, Paul Hoffman, Ted Lemon, Julian Reschke, Adam Roach, Alice Russo, Robert Sparks (Tools Team liaison), and Dave Thaler. Additional thanks to Arlen Johnson of Spherical Cow Group, LLC, for his assistance in clarifying the requirements in more CSS designer- friendly language. 11. Draft Change Log To be removed before publication 11.1. Changes from draft-iab-rfc-css-00 to -01 added .refInstance, .ulEmpty, .ears, .left, .right, .center as per HTML draft removed .comma, .closeParen, .openParen, .fullStop, .referenceGroupCSS, asper HTML draft 11.2. Changes from draft-flanagan-rfc-css to draft-iab-rfc-css revised draft name; no major changes 11.3. Changes from -02 to -03 Moved Appendix to correct location; fixed typos; moved lang-* to Appendix, 11.4. Changes from -01 to -02 Adjusted class names where possible to a common naming pattern (CamelCase). Added alignCenter, alignRight, dlHanging, ulEmpty 11.5. Changes from -00 to -01 Moved full list of classes to Appendix; only discussed classes that will have visible changeswith CSS injection attacks [CSSATTACK]. In order to avoid or mitigate any attack vectors here, thetext in the body Introduction: text regarding expected future changes added. Body: added text regarding anchors and tags; this text also applied to .relref, .url, .xref Artwork: clarified non-floating behavior of artwork List behavior: clarifiedCSS used must comply with thebehavior of .ulCompact, .olCompact, and .dlCompact as distinctcurrent CSS Specifications fromdefault list behavior; clarified behavior of .dlparallel Note: clarified text around behavior of notes RFC: added additional class to allowtheCSS to distinguish between RFCs and Internet Drafts if desired TOC: clarified text around behavior of table of contents 12.W3C. 9. References 9.1. Normative References [HTMLBP] W3C, "Best Practices for Authoring HTML Current Status",n.d.,<http://www.w3.org/standards/techs/htmlbp>. [RFC5741] Daigle, L., Ed., Kolkman, O., Ed., and IAB, "RFC Streams, Headers, and Boilerplates", RFC 5741, DOI 10.17487/RFC5741, December 2009, <http://www.rfc-editor.org/info/rfc5741>. [RFC7322] Flanagan, H. and S. Ginoza, "RFC Style Guide", RFC 7322, DOI 10.17487/RFC7322, September 2014, <http://www.rfc-editor.org/info/rfc7322>.[I-D.iab-html-rfc][RFC7990] Flanagan, H., "RFC Format Framework", RFC 7990, DOI 10.17487/RFC7990, October 2016, <http://www.rfc-editor.org/info/rfc7990>. [RFC7992] Hildebrand, J. and P. Hoffman, "HyperText Markup Language Request For Comments Format",draft-iab-html-rfc-03 (work in progress), June 2016. [I-D.iab-rfc-framework] Flanagan, H., "RFC Format Framework", draft-iab-rfc- framework-06 (work in progress), June 2016.RFC 7992, DOI 10.17487/RFC7992, October 2016, <http://www.rfc-editor.org/info/rfc7992>. 9.2. Informative References [CSSATTACK] Huang, L-S., Weinberg, Z., Evans, C., and C. Jackson, "Protecting browsers from cross-origin CSS attacks", In Proceedings of the 17th ACM conference on Computer and communications security (CCS '10), pp. 619-629, 2010, <https://doi.org/10.1145/1866307.1866376>. Appendix A. List ofclassesClasses This section lists all the CSS classes. Except for those also listedaboveinsectionSection 7, none of these result in specific changes to the natural language content of a document. o .adr o .alignCenter o .alignRight o .annotation o .artwork .art-ascii-art .art-logo .art-svg o .ascii o .author o .authors o .bcp14 o .center o .city o .compact o .country-name o .cref o .crefAnchor o .crefSource o .dlCompact o .dlHanging o .dlParallel o .docInfo o .ears o .email o .eref o .finalized o .fn o .index o .indexChar o .indexIndex o .indexItem o .indexPrimary o .indexSubItem o .initial o .iref o .irefItem o .irefRefs o .irefSubItem o .label o .left o .locality o .nameRole o .note .rfcEditorRemove o .olCompact o .olPercent o .org o .organization o .pilcrow o .postal-code o .published o .refContent o .refDate o .refInstance o .refTitle o .reference o .region o .relref o .rendered o .RFC o .rfcEditorRemove o .right o .role o .selfRef o .series o .seriesInfo o .sourcecode .lang-* o .street-address o .status o .street-address o .surname o .tel o .toc o .type o .ulCompact o .ulEmpty o .url o .workgroup o .xref o .vcard IAB Members at the Time of Approval The IAB members at the time this memo was approved were (in alphabetical order): Jari Arkko Ralph Droms Ted Hardie Joe Hildebrand Russ Housley Lee Howard Erik Nordmark Robert Sparks Andrew Sullivan Dave Thaler Martin Thomson Brian Trammell Suzanne Woolf Acknowledgements With many thanks to the RFC Format Design Team for their efforts in making this transition successful: Nevil Brownlee (ISE), Tony Hansen, Joe Hildebrand, Paul Hoffman, Ted Lemon, Julian Reschke, Adam Roach, Alice Russo, Robert Sparks (Tools Team liaison), and Dave Thaler. Additional thanks to Arlen Johnson of Spherical Cow Group, LLC, for his assistance in clarifying the requirements in more CSS-designer- friendly language. Author's Address Heather Flanagan RFC Editor Email: rse@rfc-editor.org URI: http://orcid.org/0000-0002-2647-2220