diff mbox series

[4/8] sphinx-static/theme_overrides.css: customize tags appearance

Message ID 20261028-tags-v1-4-d5ad01019eae@bootlin.com
State New
Headers show
Series Add support for documentation tags | expand

Commit Message

Antonin Godard Oct. 28, 2026, 8:04 a.m. UTC
Customize the tags appearance so that they match our color theme. This
is a customization of the sphinx-design badges CSS the sphinx-tags
extension makes use of when badges are enabled.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 documentation/sphinx-static/theme_overrides.css | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
diff mbox series

Patch

diff --git a/documentation/sphinx-static/theme_overrides.css b/documentation/sphinx-static/theme_overrides.css
index 3823db820..4fe701dc7 100644
--- a/documentation/sphinx-static/theme_overrides.css
+++ b/documentation/sphinx-static/theme_overrides.css
@@ -140,6 +140,29 @@  section#welcome-to-the-yocto-project-documentation p.caption {
     border-radius: 0 0 4px 4px;
 }
 
+/* Custom sphinx-design badge */
+.sd-badge {
+    display: inline-block;
+    padding: .35em .65em;
+    font-size: .75em;
+    font-weight: 700;
+    line-height: 1;
+    text-align: center;
+    white-space: nowrap;
+    vertical-align: baseline;
+    border-radius: .25rem;
+    color: #00557d !important;
+    background-color: #fcfcfc;
+    border-color: #00557d;
+    border-width: 1px;
+    border-style: solid;
+}
+
+/* Remove the underline from the link in the badge */
+a.sd-badge {
+    text-decoration: none;
+}
+
 @media screen {
     .wy-nav-content {
        max-width: 1000px;