Skip to content

Commit

Permalink
updating dropdown styles so that menu is legible when placed above pa…
Browse files Browse the repository at this point in the history
…ge body content
  • Loading branch information
gnomical committed Dec 6, 2022
1 parent ebdce4d commit 965636b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Lightweight and customizable theme handler for Solid JS",
"author": "Jacob Kofron",
"license": "MIT",
"version": "0.6.3",
"version": "0.6.4",
"homepage": "https://github.com/gnomical/solid-theme-provider#readme",
"repository": {
"type": "git",
Expand Down
31 changes: 20 additions & 11 deletions src/fallbacks.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,31 @@
.dropdown {
position: absolute;
top: calc(100% + 0.25em);
left: 0;
left: -.25em;
font-size: 0.9em;
text-align: left;
background: var(--stp-foreground-alpha_quarternary);
background: var(--stp-background-alpha_secondary);
-webkit-backdrop-filter: blur(15px);
backdrop-filter: blur(15px);
border-radius: var(--stp-button_radius);
padding: 0.25em;
padding: 0.5em;

&::before {
content: "";
background: var(--stp-foreground-alpha_quarternary);
border-radius: var(--stp-button_radius);
position: absolute;
pointer-events: none;
top: 0.25em;
left: 0.25em;
width: calc(100% - 0.5em);
height: calc(100% - 0.5em);
}

> div {
cursor: pointer;
white-space: nowrap;
position: relative;
&:first-child {
margin-top: 0;
}
Expand All @@ -81,21 +96,15 @@
.icon {
font-size: 0.9em;
svg {
fill: var(--stp-foreground-alpha_secondary);
fill: var(--stp-foreground);
}
}
.text {
padding-left: 0.5em;
color: var(--stp-foreground-alpha_secondary);
color: var(--stp-foreground);
}
&.active {
background: var(--stp-background);
.text {
color: var(--stp-foreground);
}
.icon svg {
fill: var(--stp-foreground);
}
}
&:hover:not(.active) {
background: var(--stp-foreground-alpha_secondary);
Expand Down

0 comments on commit 965636b

Please sign in to comment.