Skip to content

Commit

Permalink
Also ensure text colour is readable on selection
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinvis committed Oct 1, 2024
1 parent 407ce2c commit 63c293e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sphinx_lesson/_static/sphinx_lesson.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* sphinx_lesson.css */
:root {
--sphinx-lesson-selection-bg-color: #fce762;
--sphinx-lesson-selection-fg-color: #242424;
}

body.wy-body-for-nav img.with-border {
Expand Down Expand Up @@ -57,23 +58,28 @@ body.wy-body-for-nav img.with-border {
/*** Works on common browsers ***/
::selection {
background-color: var(--sphinx-lesson-selection-bg-color);
color: var(--sphinx-lesson-selection-fg-color);
}

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

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

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

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

0 comments on commit 63c293e

Please sign in to comment.