Skip to content

Commit

Permalink
underline
Browse files Browse the repository at this point in the history
  • Loading branch information
gabalafou committed Dec 20, 2023
1 parent 01df012 commit faeb165
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/pydata_sphinx_theme/assets/styles/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,19 @@ pre {
background-color: var(--pst-color-secondary);
border: none;

.fa-arrow-up {
// Using margin instead of a space character prevents the space between the
// icon and the text from being underlined when the button is hovered.
margin-inline-end: 0.5em;
}

@include link-style-hover;
&:hover {
text-decoration-thickness: 1px;
background-color: var(--pst-violet-600);
color: var(--pst-color-secondary-text);
}

&:focus-visible {
box-shadow: none;
outline: $focus-ring-outline;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,13 @@ details.sd-dropdown {
* Buttons (which in Sphinx Design are actually links that look like buttons)
*/
html {
.sd-btn {
@include link-style-hover; // override Sphinx Design
&:hover {
text-decoration-thickness: 1px;
}
}

@each $name in $sd-semantic-color-names {
.sd-btn-#{$name} {
&:focus-visible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
{# the scroll to top button #}
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
<i class="fa-solid fa-arrow-up"></i>
{{ _("Back to top") }}
{{- _("Back to top") -}}
</button>

{# checkbox to toggle primary sidebar #}
Expand Down

0 comments on commit faeb165

Please sign in to comment.