Skip to content

Commit

Permalink
fix(style): replace bg colors with css variables (#1430)
Browse files Browse the repository at this point in the history
* chore: replace bg colors with css variables

* chore: update bg colors for itemfilter

* chore: update bg colors for layercontrol

* chore: update bg colors for jsonform

* chore: remove select style from utils

* chore: fix format

* chore: remove styling from unstyled style
  • Loading branch information
radupasparuga authored Dec 17, 2024
1 parent 92a5eb3 commit 23c74dd
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 3 deletions.
6 changes: 5 additions & 1 deletion elements/itemfilter/src/style.eox.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ export const styleEOX = `
#000000 20%,
transparent
);
--background-color: #fff;
--background-color: var(--eox-background-color, transparent);
--padding: 0.5rem;
--text-transform: capitalize;
--form-flex-direction: column;
--filter-display: block;
background-color: var(--background-color);
}
* {
font-family: Roboto, sans-serif;
Expand Down Expand Up @@ -517,4 +518,7 @@ eox-itemfilter-results li.highlighted {
font-size: x-small;
top: -8px;
}
input {
background-color: var(--background-color);
}
`;
10 changes: 10 additions & 0 deletions elements/jsonform/src/style.eox.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
export const styleEOX = `
:host, :root {
--background-color: var(--eox-background-color, transparent);
background-color: var(--background-color, transparent);
}
form {
background-color: var(--background-color, transparent);
}
.CodeMirror {
background-color: var(--background-color, transparent);
}
[data-schemaid=root] > .je-header {
display: none;
}
Expand Down
3 changes: 2 additions & 1 deletion elements/layercontrol/src/components/tools-items.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ export class EOxLayerControlTabs extends LitElement {
display: flex;
justify-content: start;
align-items: center;
background: var(--background-color) !important;
}
.listed label:not(:first-of-type) {
margin-top: 10px;
Expand All @@ -204,7 +205,7 @@ export class EOxLayerControlTabs extends LitElement {
cursor: pointer;
}
figure {
background: #00417011;
background: var(--background-color);
border-top: 1px solid #0041701a;
padding: 8px var(--padding);
}
Expand Down
5 changes: 5 additions & 0 deletions elements/layercontrol/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,11 @@ export class EOxLayerControl extends LitElement {
display: block;
padding: var(--padding) 0;
--background-color: var(--eox-background-color, transparent);
background-color: var(--background-color, transparent);
}
select {
background-color: var(--background-color);
}
`;
}
Expand Down
2 changes: 2 additions & 0 deletions utils/styles/input.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ textarea {
background: var(--background-color);
}

input,
input[type="text"],
input[type="url"],
input[type="email"],
Expand All @@ -26,4 +27,5 @@ select {
padding: 5px 7px;
border-radius: 4px;
border: 1px solid #0004;
background-color: var(--background-color);
}
2 changes: 1 addition & 1 deletion utils/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
--block-spacing-vertical: calc(var(--spacing) * 2);
--block-spacing-horizontal: var(--spacing);

--background-color: var(--eox-background-color, white);
--background-color: var(--eox-background-color, transparent);
--color: var(--eox-color, #2c3d49);
--h-color: var(--eox-h-color, var(--color));

Expand Down

0 comments on commit 23c74dd

Please sign in to comment.