Skip to content

Commit 82b1d1f

Browse files
authored
Assorted CSS fixes (#220)
* Fix maths alignment * Fix some CSS for hover borders
1 parent a6c5dbb commit 82b1d1f

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

src/sunpy_sphinx_theme/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def setup(app: Sphinx):
156156
# Register theme
157157
theme_dir = get_html_theme_path()
158158
app.add_html_theme("sunpy", theme_dir)
159-
app.add_css_file("sunpy_style.css")
159+
app.add_css_file("sunpy_style.css", priority=600)
160160

161161
app.connect("builder-inited", update_config)
162162
app.connect("html-page-context", update_html_context)

src/sunpy_sphinx_theme/theme/sunpy/static/sunpy_style.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700,900");
22

3-
html {
3+
:root {
44
--pst-font-size-base: 17px;
55
--pst-sidebar-font-size: 1em;
66
--pst-font-family-base: "Source Sans Pro", var(--pst-font-family-base-system);
@@ -31,6 +31,9 @@ html {
3131
--sst-header-background: var(--sst-dark-color);
3232
--sst-header-text: var(--sst-lighter-color);
3333
--sst-sidebar-background-color: var(--pst-color-background);
34+
35+
/* sphinx-design themeing */
36+
--sd-color-card-border-hover: var(--sst-accent-color-bright);
3437
}
3538

3639
html[data-theme="light"] {
@@ -66,6 +69,7 @@ body {
6669
--sg-download-a-hover-background-color: var(--sg-download-a-background-color);
6770
--sg-download-a-hover-box-shadow-1: none;
6871
--sg-download-a-hover-box-shadow-2: none;
72+
--sg-thumb-hover-border: var(--sst-accent-color-bright);
6973
}
7074

7175
/* Global Styling */
@@ -82,6 +86,11 @@ code.literal {
8286
color: var(--sst-darker-color) !important;
8387
}
8488

89+
div.math {
90+
flex-direction: row;
91+
justify-content: center;
92+
}
93+
8594
.modal {
8695
--bs-modal-bg: var(--pst-color-background);
8796
}

test_package/docs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Documentation :any:`index <genindex>` and :any:`Module <modindex>` index.
2020

2121
.. grid-item-card::
2222
:class-card: card
23+
:link: subsections
24+
:link-type: ref
2325

2426
Conventions
2527
^^^^^^^^^^^

test_package/docs/subsections.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _subsections:
2+
13
###########
24
subsections
35
###########

0 commit comments

Comments
 (0)