Skip to content

Commit

Permalink
fix(project): make header buttons visible when using a light header b…
Browse files Browse the repository at this point in the history
…ackground
  • Loading branch information
ChristiaanScheermeijer committed Jun 23, 2021
1 parent 15a5eaa commit dd94c5d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/Button/Button.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $large-button-height: 40px;
}

&.default {
color: theme.$btn-default-color;
color: currentColor;
background-color: theme.$btn-default-bg;
}

Expand Down
7 changes: 6 additions & 1 deletion src/components/Header/Header.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
.header {
height: variables.$header-height;
padding: 10px variables.$base-spacing * 4;
background: var(--header-background);
color: var(--header-contrast-color, variables.$white);
background: var(--header-background, transparent);

//
// Make header fixed
Expand Down Expand Up @@ -53,6 +54,10 @@
.iconButton {
width: 36px;
height: 36px;

> svg {
fill: currentColor;
}
}

//
Expand Down
3 changes: 1 addition & 2 deletions src/components/IconButton/IconButton.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
align-items: center;
width: 40px;
height: 40px;
outline: none;
outline-color: var(--highlight-color, white);
outline: var(--highlight-color, white) none;

cursor: pointer;
opacity: 0.7;
Expand Down
7 changes: 6 additions & 1 deletion src/components/SearchBar/SearchBar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
height: 100%;
padding: 0 36px 0 36px;

color: variables.$white;
color: currentColor;
font-weight: 700;
font-size: 16px;

Expand All @@ -29,6 +29,11 @@

transition: border 0.1s ease, background 0.1s ease;

&::-webkit-input-placeholder {
color: currentColor;
opacity: 0.5;
}

&:focus,
&:active {
border-color: variables.$white;
Expand Down
1 change: 1 addition & 0 deletions src/providers/ConfigProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const ConfigProvider: FunctionComponent<ProviderProps> = ({
}
if (root && headerBackground) {
root.style.setProperty('--header-background', headerBackground);
root.style.setProperty('--header-contrast-color', calculateContrastColor(headerBackground));
}
};

Expand Down

0 comments on commit dd94c5d

Please sign in to comment.