Skip to contentSkip to conversation

doc: improve HTML spacing in release notes

PATCH In review Thomas Monjalon 2 participants 4 messages Feb 12, 2018 – Feb 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: improve HTML spacing in release notes

Vertical spacing is lower before an item title than after. So the items with paragraphs are not well separated.

A custom CSS is added to override the rtd theme.

---
 doc/guides/conf.py    | 2 ++
 doc/guides/custom.css | 7 +++++++
 mk/rte.sdkdoc.mk      | 8 +++++++-
 3 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 doc/guides/custom.css
doc/guides/conf.py +2 -0
index 77d93acf1..cf06f2572 100644
@@ -391,3 +391,5 @@ def setup(app):
         app.add_role('numref', numref_role)
         # Process the numref references once the doctree has been created.
         app.connect('doctree-resolved', process_numref)
+
+    app.add_stylesheet('css/custom.css')
doc/guides/custom.css new file +7 -0
new file mode 100644
index 000000000..fe9fee3ca
@@ -0,0 +1,7 @@
+/* These custom CSS rules override readthedocs theme */
+
+/* Spacing before a list item must be bigger than spacing inside the item.
+ * Complex list items start with a p.first element. */
+.section li > .first {
+	margin-top: 18px;
+}
mk/rte.sdkdoc.mk +7 -1
index de31b78cf..bce57c5da 100644
@@ -117,7 +117,13 @@ guides-pdf-%:
 	$(Q)mv $(RTE_OUTPUT)/doc/pdf/guides/$*/doc.pdf \
 		$(RTE_OUTPUT)/doc/pdf/guides/$*.pdf
 
-guides-%:
+guides-html-prepare:
+	$(Q)install -D -m0644 $(RTE_SDK)/doc/guides/custom.css \
+		$(RTE_OUTPUT)/doc/html/guides/_static/css/custom.css
+
+guides-%-prepare: ;
+
+guides-%: guides-%-prepare
 	@echo 'sphinx processing $@...'
 	$(Q)$(RTE_SPHINX_BUILD) -b $* $(RTE_SPHINX_VERBOSE) \
 		-c $(RTE_SDK)/doc/guides $(RTE_SDK)/doc/guides \
Signature · 1 line
2.15.1
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday, February 12, 2018 5:45 PM
To: Mcnamara, John <[email protected]>
Cc: [email protected]
Subject: [PATCH] doc: improve HTML spacing in release notes

Quoted 5 lines

Vertical spacing is lower before an item title than after. So the items with paragraphs are not well separated.

A custom CSS is added to override the rtd theme.

That's great. It fixes a long standing irritation with the formatting of the release notes, and other lists.

Also, it gives us the opportunity to improve the CSS in other ways.

#2 lore raw

13/02/2018 10:09, Mcnamara, John:

Quoted 8 lines

From: Thomas Monjalon [mailto:[email protected]]

Quoted 4 lines

Vertical spacing is lower before an item title than after. So the items with paragraphs are not well separated.

A custom CSS is added to override the rtd theme.

That's great. It fixes a long standing irritation with the formatting of the release notes, and other lists.

Me too, I was irritated about this formatting :)
But I never tried to fix it until you talked about it with me.
Conclusion: we must communicate about our frustrations ;)

Quoted 1 line

Also, it gives us the opportunity to improve the CSS in other ways.

Yes, this custom CSS can be extended.

author Applied
#3 lore raw

13/02/2018 10:33, Thomas Monjalon:

Quoted 10 lines

13/02/2018 10:09, Mcnamara, John:

Quoted 8 lines

From: Thomas Monjalon [mailto:[email protected]]

Quoted 4 lines

Vertical spacing is lower before an item title than after. So the items with paragraphs are not well separated.

A custom CSS is added to override the rtd theme.

That's great. It fixes a long standing irritation with the formatting of the release notes, and other lists.

Quoted 7 lines

Me too, I was irritated about this formatting :)
But I never tried to fix it until you talked about it with me.
Conclusion: we must communicate about our frustrations ;)

Quoted 1 line

Also, it gives us the opportunity to improve the CSS in other ways.

Yes, this custom CSS can be extended.

Applied