diff --git a/README.md b/README.md index 5f0ae36da..4b9d8c8c6 100644 --- a/README.md +++ b/README.md @@ -251,43 +251,30 @@ There are a few key rules enforced by Stylelint: - reference for crafting your own themes. To tweak or adjust an existing theme, you may override some common CSS variables found in the themes. - -Available CSS variables are: ---color-accent: Color for accent elements, primarily used to add a brand highlights to the theme. ---color-key: Color for body text, and other elements using the inherited body text color. ---color-neutral: Subtle color, usually shades of gray, for element borders and other subtle details. ---color-stock: Article/Page background color, but also used for other elements. ---font-family-body: Font-family for paragraphs and other non-headline elements ---font-family-heading: Font-family for paragraphs and other non-headline elements ---font-family-mono: Font-family for monospaced text elements such as \`pre\` and \`code\`. ---max-width: Max width for textual elements and other non-media content. ---max-width-media: Maximum width for media content, including images and interactive Code Chunks. - -Note that not all themes make use of all available variables, and that some may expose additional options. -Please refer to the specific theme documentation. +Please refer to the specific theme documentation for available variables. Type selectors -For types defined in http://schema.org (e.g. \`Article\`), or extensions such as, -http://schema.stenci.la (e.g. \`CodeChunk\`), http://bioschemas.org (e.g. \`Taxon\`) etc. +For types defined in http://schema.org (e.g. `Article`), or extensions such as, +http://schema.stenci.la (e.g. `CodeChunk`), http://bioschemas.org (e.g. `Taxon`) etc. Conventions: - use the same upper camel case as in the schema the type is defined in -- use a \`[itemtype=...]\` selector if possible (i.e. if Encoda encodes it in HTML) +- use a `[itemtype=...]` selector if possible (i.e. if Encoda encodes it in HTML) Property selectors For properties of types defined in schemas. Note that -some of these select an entire container property e.g. \`authors\` and +some of these select an entire container property e.g. `authors` and selector for a class, and some select items in those properties -e.g. \`author\` and select for a \`itemprop\`. +e.g. `author` and select for a `itemprop`. Conventions: - use the same lower camel case as in the schema the property is defined in -- use a \`.class\` selector for container properties -- use a \`[itemprop=...]\` selector for singular properties, or items of container properties +- use a `.class` selector for container properties +- use a `[itemprop=...]` selector for singular properties, or items of container properties There are several additional selectors which are not found as the Stencila Schema definitions. These are: diff --git a/src/examples/articleReadme.html b/src/examples/articleReadme.html index 2a8e3e625..eb5840d9f 100644 --- a/src/examples/articleReadme.html +++ b/src/examples/articleReadme.html @@ -256,15 +256,25 @@

skeleton A theme with lots of bones but - no flesh. Designed to be used as a starting point for creating new themes, it only has - empty stubs for each semantic selector e.g. + no flesh.Designed to be used as a starting point for creating new themes, it tries to be + as unopinionated as possible. stencila A theme reflecting Stencila's brand and design system. + itemtype="http://schema.stenci.la/Link">design system. It is based on the Skeleton + theme, and demonstrates how to customize a theme using CSS variables. + + + wilmore + A theme well suited for + consuming long-form manuscripts and prose. Named after Edmond Dantés' alias, “Lord Wilmore: An Englishman, and + the persona in which Dantès performs random acts of generosity.“ @@ -583,20 +593,14 @@

Appr Stylelint:

To tweak or adjust an existing theme, - you may override some common CSS variables found in the themes.

-

Available CSS variables are: - --color-accent: Color for accent elements, primarily used to add a brand highlights to the - theme. --color-key: Color for body text, and other elements using the inherited body text color. - --color-neutral: Subtle color, usually shades of gray, for element borders and other subtle - details. --color-stock: Article/Page background color, but also used for other elements. - --font-family-body: Font-family for paragraphs and other non-headline elements - --font-family-heading: Font-family for paragraphs and other non-headline elements - --font-family-mono: Font-family for monospaced text elements such as `pre` and `code`. - --max-width-media: Maximum width for media content, including images and interactive Code - Chunks. --max-width: Max width for textual elements and other non-media content.

-

Note that not all themes make use of - all available variables, and that some may expose additional options. Please refer to the - specific theme documentation.

+ you may override some common CSS variables found in the themes. Please refer to the specific + theme documentation for available variables.

Type selectors

For types defined in http://schema.org (e.g. `Article`), or extensions - such as, http://schema.stenci.la (e.g. `CodeChunk`), http://schema.org (e.g. Article), or extensions such as, http://schema.stenci.la (e.g. CodeChunk), http://bioschemas.org (e.g. `Taxon`) etc.

+ itemtype="http://schema.stenci.la/Link">http://bioschemas.org (e.g. Taxon) etc.

Conventions:

Property selectors

For properties of types defined in - schemas. Note that some of these select an entire container property e.g. `authors` and selector - for a class, and some select items in those properties e.g. `author` and select for a - `itemprop`.

+ schemas. Note that some of these select an entire container property e.g. authors and selector for a class, and + some select items in those properties e.g. author and select for a itemprop.

Conventions:

+

There are several additional + selectors which are not found as the Stencila Schema definitions. These are:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SelectorDescriptionTarget
:--rootIt maps to the root element + generated by Encoda. This is done to avoid potential clashes with external stylesheets, + and to ensure that Thema only styles semantically annotated content.[data-itemscope=root]
:--CodeBlockTypesBlock level code elements:--CodeBlock, :--CodeChunk
:--CodeTypesInline level code elements + :--CodeBlock, :--CodeChunk, :--Code, :--CodeError, :--CodeExpression, :--CodeFragment, + :--SoftwareSourceCode
:--ListTypesList elements, both ordered + and unordered, as well as other lists such as author affiliations and article references + :--Article:--root > + :--affiliations, :--Collection, :--List, :--references > ol
:--MediaTypesThese are elements which + usually benefit from taking up a wider screen area. Elements such as images, video + elements, code blocks:--CodeBlock, :--CodeChunk, :--Datatable, :--Figure, :--ImageObject, :--MediaObject, + :--Table, :--VideoObject

Notes