Skip to content
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

Merged
merged 5 commits into from
Jun 20, 2024
Merged

Conversation

eti7075
Copy link
Collaborator

@eti7075 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.

@eti7075 eti7075 linked an issue Jun 12, 2024 that may be closed by this pull request
3 tasks
@@ -61,4 +61,7 @@

box-shadow: 0 2px 4px black;
color: white;

scrollbar-color: var(--ifm-color-secondary-darkest)
Copy link
Collaborator Author

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/"
Copy link
Collaborator Author

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}
Copy link
Collaborator Author

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 {
Copy link
Collaborator Author

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 ${
Copy link
Collaborator Author

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) {
Copy link
Collaborator Author

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

@eti7075 eti7075 requested a review from Bonkles June 20, 2024 17:50
@eti7075 eti7075 merged commit 4239c43 into main Jun 20, 2024
1 check passed
@eti7075 eti7075 deleted the light-dark branch June 21, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Style pass: light/dark mode
2 participants