-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing some light/dark mode issues lying around the site. #71
Conversation
eti7075
commented
Jun 12, 2024
- Added a variable background color for the theme selector icon to match the navbar color scheme in dark mode.
- Changed the gutter color and scroller color for the scroll bar in the inspector panel table during dark mode usage.
- Updated the :root background color scheme to be more consistent. Now, regardless of the user's browser dark/light preference, the site root will have the same background, resulting in a consistent map shade.
@@ -61,4 +61,7 @@ | |||
|
|||
box-shadow: 0 2px 4px black; | |||
color: white; | |||
|
|||
scrollbar-color: var(--ifm-color-secondary-darkest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only substantive change. This lies within the .theme-dark .inspector-panel property definition. Other changes are formatting
@@ -23,7 +23,11 @@ function InspectorPanel({ entity }) { | |||
</tbody> | |||
</table> | |||
<p> | |||
<a href="https://docs.overturemaps.org/schema/" target="_blank" rel="noreferrer noopener"> | |||
<a | |||
href="https://docs.overturemaps.org/schema/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting
@@ -327,7 +325,10 @@ export default function Map({ mode, mapEntity, setMapEntity, setZoom }) { | |||
<InspectorPanel entity={mapEntity} /> | |||
)} | |||
|
|||
<ThemeSelector visibleThemes={setVisibleThemes}></ThemeSelector> | |||
<ThemeSelector | |||
mode={mode} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds mode state to theme selector, also includes formatting changes
} | ||
|
||
svg.icon-layers-dark { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only substantive change, adding a adaptive background coloring and border radius to match the light mode shape. All other changes in file are formatting.
@@ -24,7 +24,11 @@ function ThemeSelector({ visibleThemes }) { | |||
return ( | |||
<div className="dropdown dropdown--hoverable theme-selector tour-layers"> | |||
<div className="layer-control"> | |||
<LayerIcon /> | |||
<LayerIcon | |||
className={`icon-layers ${ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding classname to icon for css
@@ -92,3 +92,9 @@ div.theme-light { | |||
color: #213547; | |||
background-color: #ffffff; | |||
} | |||
|
|||
@media (prefers-color-scheme: dark) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updating the background during dark mode browser usage