Skip to content

Commit

Permalink
Use a custom selection bg color
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinvis committed Oct 1, 2024
1 parent d640423 commit 407ce2c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions sphinx_lesson/_static/sphinx_lesson.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/* sphinx_lesson.css */
:root {
--sphinx-lesson-selection-bg-color: #fce762;
}

body.wy-body-for-nav img.with-border {
border: 2px solid;
Expand Down Expand Up @@ -49,3 +52,28 @@ body.wy-body-for-nav img.with-border {
.rst-content .admonition.toggle-hidden {
padding-bottom: 0px;
}

/* selection / highlight colour uses a yellow background and a black text */
/*** Works on common browsers ***/
::selection {
background-color: var(--sphinx-lesson-selection-bg-color);
}

/*** Mozilla based browsers ***/
::-moz-selection {
background-color: var(--sphinx-lesson-selection-bg-color);
}

/***For Other Browsers ***/
::-o-selection {
background-color: var(--sphinx-lesson-selection-bg-color);
}

::-ms-selection {
background-color: var(--sphinx-lesson-selection-bg-color);
}

/*** For Webkit ***/
::-webkit-selection {
background-color: var(--sphinx-lesson-selection-bg-color);
}

0 comments on commit 407ce2c

Please sign in to comment.