Skip to content

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