Internet Architecture Board (IAB) H. Flanagan Request for Comments: 7993 RFC Editor Category: Informational December 2016 ISSN: 2070-1721
Cascading Style Sheets (CSS) Requirements for RFCs
Abstract
The HTML format for RFCs assigns style guidance to a Cascading Style Sheet (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 in "HTML for RFCs" (RFC 7992).
Status of This Memo
This document is not an Internet Standards Track specification; it is published for informational purposes.
This document is a product of the Internet Architecture Board (IAB) and represents information that the IAB has deemed valuable to provide for permanent record. It represents the consensus of the Internet Architecture Board (IAB). Documents approved for publication by the IAB are not a candidate for any level of Internet 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 be obtained at 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.
The HTML format for RFCs, described in [RFC7992], assigns style guidance to a Cascading Style Sheet (CSS) specifically defined for the RFC Series. This CSS will be embedded in the published HTML, and it may be overridden by a locally defined CSS, 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 are listed below. A class is identified for 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 [RFC7990].
The details included in this document are expected to change based on experience gained in implementing the new publication toolsets. Revised documents will be published capturing those changes as the toolsets are completed. Other implementers must not expect those changes to remain backwards compatible with the details included in this document.
The document header must be at the top of the document and include all information described in "RFC Style Guide" [RFC7322] and "RFC Streams, Headers, and Boilerplates" [RFC7841].
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, for example, through the use of color and/or text decoration, following appropriate accessibility standards.
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 style sheet, as desired.
Lists should provide ample whitespace between list elements for legibility unless a 'compact' class is specified (e.g., .dlCompact, .ulCompact, .olCompact).
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, is included in Appendix A.
These classes will mostly be styled as part of '.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.
An RFC Editor note may be added after the standard boilerplate. It should be visually distinct to highlight final removal of the note by the RFC Editor.
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.
Pilcrows, when used as described in 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.
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.
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.).
Security vulnerabilities can be introduced through the CSS, as with CSS injection attacks [CSSATTACK]. In order to avoid or mitigate any attack vectors here, the CSS used must comply with the current CSS Specifications from the W3C.
[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>.
This section lists all the CSS classes. Except for those also listed in Section 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
Flanagan Informational [Page 10]
RFC 7993 CSS Reqs for RFCs December 2016
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
Flanagan Informational [Page 11]
RFC 7993 CSS Reqs for RFCs December 2016
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
Flanagan Informational [Page 12]
RFC 7993 CSS Reqs for RFCs December 2016
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
Flanagan Informational [Page 13]
RFC 7993 CSS Reqs for RFCs December 2016
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.