DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] doc: improve HTML spacing in release notes
@ 2018-02-12 17:44 Thomas Monjalon
  2018-02-13  9:09 ` Mcnamara, John
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2018-02-12 17:44 UTC (permalink / raw)
  To: john.mcnamara; +Cc: dev

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.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 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

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 77d93acf1..cf06f2572 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -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')
diff --git a/doc/guides/custom.css b/doc/guides/custom.css
new file mode 100644
index 000000000..fe9fee3ca
--- /dev/null
+++ b/doc/guides/custom.css
@@ -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;
+}
diff --git a/mk/rte.sdkdoc.mk b/mk/rte.sdkdoc.mk
index de31b78cf..bce57c5da 100644
--- a/mk/rte.sdkdoc.mk
+++ b/mk/rte.sdkdoc.mk
@@ -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 \
-- 
2.15.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: improve HTML spacing in release notes
  2018-02-12 17:44 [dpdk-dev] [PATCH] doc: improve HTML spacing in release notes Thomas Monjalon
@ 2018-02-13  9:09 ` Mcnamara, John
  2018-02-13  9:33   ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Mcnamara, John @ 2018-02-13  9:09 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Monday, February 12, 2018 5:45 PM
> To: Mcnamara, John <john.mcnamara@intel.com>
> Cc: dev@dpdk.org
> Subject: [PATCH] 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.
> 

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.


Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: improve HTML spacing in release notes
  2018-02-13  9:09 ` Mcnamara, John
@ 2018-02-13  9:33   ` Thomas Monjalon
  2018-02-13 23:21     ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2018-02-13  9:33 UTC (permalink / raw)
  To: Mcnamara, John; +Cc: dev

13/02/2018 10:09, Mcnamara, John:
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > 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 ;)

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

Yes, this custom CSS can be extended.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: improve HTML spacing in release notes
  2018-02-13  9:33   ` Thomas Monjalon
@ 2018-02-13 23:21     ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2018-02-13 23:21 UTC (permalink / raw)
  To: Mcnamara, John; +Cc: dev

13/02/2018 10:33, Thomas Monjalon:
> 13/02/2018 10:09, Mcnamara, John:
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > 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 ;)
> 
> > Also, it gives us the opportunity to improve the CSS in other ways.
> 
> Yes, this custom CSS can be extended.

Applied

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-13 23:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-12 17:44 [dpdk-dev] [PATCH] doc: improve HTML spacing in release notes Thomas Monjalon
2018-02-13  9:09 ` Mcnamara, John
2018-02-13  9:33   ` Thomas Monjalon
2018-02-13 23:21     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).