[PATCH] docs: render <span class="literal"> with monospace font

Daniel P. Berrangé posted 1 patch 4 years, 3 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200206130518.2397097-1-berrange@redhat.com
docs/libvirt.css | 5 +++++
1 file changed, 5 insertions(+)
[PATCH] docs: render <span class="literal"> with monospace font
Posted by Daniel P. Berrangé 4 years, 3 months ago
When using ``....`` in RST, this results in <span class="literal">...</span>
instead of <code>...</code>. We thus need an extra rule to render it
with a monospace font. Colouring a light gray also helps the text
stand out a little more and matches background of <pre> blocks.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 docs/libvirt.css | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/docs/libvirt.css b/docs/libvirt.css
index d2e1842b62..50cf02e348 100644
--- a/docs/libvirt.css
+++ b/docs/libvirt.css
@@ -574,3 +574,8 @@ ul.news-section-content li dl dd {
     margin-top: 0.5em;
     margin-bottom: 0.5em;
 }
+
+span.literal, code {
+    font-family: monospace;
+    background: #eeeeee;
+}
-- 
2.24.1

Re: [PATCH] docs: render <span class="literal"> with monospace font
Posted by Ján Tomko 4 years, 3 months ago
On Thu, Feb 06, 2020 at 01:05:18PM +0000, Daniel P. Berrangé wrote:
>When using ``....`` in RST, this results in <span class="literal">...</span>

Same for me [0], however it shows up as <tt class="literal"> on the libvirt
website.

>instead of <code>...</code>. We thus need an extra rule to render it
>with a monospace font. Colouring a light gray also helps the text
>stand out a little more and matches background of <pre> blocks.
>
>Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>---
> docs/libvirt.css | 5 +++++
> 1 file changed, 5 insertions(+)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano

[0] python3-docutils-0.14-6.fc30.noarch
Re: [PATCH] docs: render <span class="literal"> with monospace font
Posted by Daniel P. Berrangé 4 years, 3 months ago
On Thu, Feb 06, 2020 at 04:00:56PM +0100, Ján Tomko wrote:
> On Thu, Feb 06, 2020 at 01:05:18PM +0000, Daniel P. Berrangé wrote:
> > When using ``....`` in RST, this results in <span class="literal">...</span>
> 
> Same for me [0], however it shows up as <tt class="literal"> on the libvirt
> website.

Oh because Fedora uses HTML5, but our configure script is set to
fallback to the HTML4 generator on older docutils.

I'll  extend the CSS to cover 'tt' too

> 
> > instead of <code>...</code>. We thus need an extra rule to render it
> > with a monospace font. Colouring a light gray also helps the text
> > stand out a little more and matches background of <pre> blocks.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> > docs/libvirt.css | 5 +++++
> > 1 file changed, 5 insertions(+)
> > 
> 
> Reviewed-by: Ján Tomko <jtomko@redhat.com>
> 
> Jano
> 
> [0] python3-docutils-0.14-6.fc30.noarch



Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|