Skip to content

Commit 646bdc0

Browse files
fix: styles with sphinx design elements (#306)
1 parent a3d9b17 commit 646bdc0

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -862,19 +862,23 @@ html[data-theme="dark"] .highlight pre {
862862
Sphinx design
863863
##############
864864
*/
865+
866+
blockquote {
867+
background-color: var(--pst-color-background);
868+
}
865869
.sd-sphinx-override,
866870
.sd-sphinx-override * {
867-
background-color: transparent !important;
868871
font-size: medium;
869872
flex: auto;
870873
}
874+
871875
/* Sphinx-design tab */
872876

873877
/* Common styles for all screen sizes */
874878
.sd-tab-set > input:not(.focus-visible) + label {
875879
outline: none;
876880
font-size: large;
877-
-webkit-tap-highlight-color: transparent;
881+
-webkit-tap-highlight-color: var(--pst-color-background) !important;
878882
color: var(--pst-color-text-base);
879883
}
880884

@@ -917,12 +921,13 @@ Sphinx design
917921
/* Common styles for all screen sizes */
918922
.sd-card .sd-card-text {
919923
font-family: var(--pst-font-family-base) !important;
924+
background-color: var(--pst-color-background) !important;
920925
}
921926

922-
.sd-card .sd-card-header {
927+
.bd-content .sd-card .sd-card-header {
923928
border: none;
924-
background-color: white;
925-
color: #150458 !important;
929+
background-color: transparent;
930+
color: var(--pst-color-text-base) !important;
926931
font-size: var(--pst-font-size-h5);
927932
font-weight: bold;
928933
font-family: var(--pst-font-family-base);
@@ -936,6 +941,12 @@ Sphinx design
936941
font-family: var(--pst-font-family-base);
937942
}
938943

944+
.bd-content .sd-card .sd-card-body,
945+
.bd-content .sd-card .sd-card-footer,
946+
.bd-content .sd-card .sd-card-text {
947+
background-color: transparent;
948+
}
949+
939950
html[data-theme="dark"] .sd-shadow-sm {
940951
box-shadow: 0 0.1rem 1rem rgba(250, 250, 250, 0.6) !important;
941952
}
@@ -976,15 +987,19 @@ html[data-theme="dark"] .sd-card-img-top[src*=".png"] {
976987
Sphinx-design dropdown
977988
*/
978989

979-
details.sd-dropdown .sd-summary-title {
990+
.bd-content details.sd-dropdown .sd-summary-title {
980991
border: 1px solid var(--pst-color-text-base) !important;
981-
color: var(--sd-color-card-text) !important;
992+
color: var(--pst-color-text-base) !important;
982993
font-family: var(monospace) !important;
983994
font-size: medium;
984995
text-align: left;
985996
padding-left: 1rem;
986997
}
987998

999+
details.sd-dropdown summary.sd-card-header + div.sd-summary-content {
1000+
background-color: transparent;
1001+
}
1002+
9881003
/*
9891004
#################################
9901005
Right side toctree color and font

0 commit comments

Comments
 (0)