Skip to content

Commit

Permalink
Merge pull request #857 from posit-dev/dotnomad/a-style
Browse files Browse the repository at this point in the history
Style anchors and hover based on light/dark mode
  • Loading branch information
dotNomad authored Jan 23, 2024
2 parents 7a9b726 + 524e6e7 commit d72b180
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions web/src/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
:root {
--posit-light-blue-1: #D1DBE5;
--posit-light-blue-2: #A2B8CB;
--posit-light-blue-3: #7494B1;
--posit-blue: #447099;
--posit-dark-blue-1: #305775;
}

h1, h2, h3, h4, h5, h6, p, dd, dl {
margin: 0;
}
Expand Down Expand Up @@ -35,13 +43,29 @@ h1, h2, h3, h4, h5, h6, p, dd, dl {
--focus-shadow-border-color-opacity: 0.2;
}

.body--light a {
color: var(--vscode-textLink-foreground, var(--posit-blue));
}

.body--light a:hover {
color: var(--vscode-textLink-activeForeground, var(--posit-dark-blue-1));
}

.body--dark {
--focus-shadow-color: 255, 255, 255;
--focus-shadow-color-opacity: 0.18;
--focus-shadow-border-color: 255, 255, 255;
--focus-shadow-border-color-opacity: 0.25;
}

.body--dark a {
color: var(--vscode-textLink-foreground, var(--posit-light-blue-2));
}

.body--dark a:hover {
color: var(--vscode-textLink-activeForeground, var(--posit-light-blue-1));
}

.focus-shadow:focus,
.focus-shadow:focus-within {
--focus-shadow: 0 0 0 4px rgba(var(--focus-shadow-color), var(--focus-shadow-color-opacity));
Expand Down

0 comments on commit d72b180

Please sign in to comment.