Skip to content
\n
\n \n\n \n \n \n \n
style='title page subtitle')
\n
\n
\n, I didn't find any matching CSS rule in the docs. Can anyone help?

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

The default matcher defines a style label for Paragraph with style='title page subtitle'. The style label is also named title page subtitle. So for this paragraph, you can create a style definition in your style sheet like this:

\n
[title page subtitle]\nbase = body\nfont_size = 10pt
\n

Have a look at the Sphinx style sheet to get an idea of which style labels are available and the style properties they support. See the reference documentation for the full list of style labels and the properties supported by each of the style classes.

\n

If you introduce Paragraph instances with a custom style in your template; e.g. Paragraph('hello', style='my style'), you need to include a selector in the style sheet:

\n
[my paragraph : Paragraph('my style')]\nbase = body\nfont_size = 10pt
\n

Within the brackets, 'my paragraph' is the style label, and 'my style' should match what is passed to Paragraph's style argument.

","upvoteCount":1,"url":"https://github.com/brechtm/rinohtype/discussions/346#discussioncomment-3272742"}}}

Example of CSS for custom style on Paragraph? #346

Answered by brechtm
edmondop asked this question in Q&A
Discussion options

You must be logged in to vote

The default matcher defines a style label for Paragraph with style='title page subtitle'. The style label is also named title page subtitle. So for this paragraph, you can create a style definition in your style sheet like this:

[title page subtitle]
base = body
font_size = 10pt

Have a look at the Sphinx style sheet to get an idea of which style labels are available and the style properties they support. See the reference documentation for the full list of style labels and the properties supported by each of the style classes.

If you introduce Paragraph instances with a custom style in your template; e.g. Paragraph('hello', style='my style'), you need to include a selector in the style sh…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by edmondop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants