Skip to content

Commit

Permalink
feat(tokens): add --cc-color-border-neutral-disabled and use it whe…
Browse files Browse the repository at this point in the history
…n relevant
  • Loading branch information
florian-sanders-cc committed May 22, 2023
1 parent ce1449f commit 3034296
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/cc-input-number/cc-input-number.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ export class CcInputNumber extends LitElement {
}
:host([disabled]) .ring {
border-color: var(--cc-color-bg-neutral-disabled);
border-color: var(--cc-color-border-neutral-disabled, #777);
background: var(--cc-color-bg-neutral-disabled);
}
Expand All @@ -436,7 +436,7 @@ export class CcInputNumber extends LitElement {
.skeleton .ring,
.skeleton:hover .ring,
.skeleton input:hover + .ring {
border-color: #eee;
border-color: var(--cc-color-border-neutral-disabled, #777);
background-color: var(--cc-color-bg-neutral-disabled);
cursor: progress;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/cc-input-text/cc-input-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ export class CcInputText extends LitElement {
}
:host([disabled]) .ring {
border-color: #eee;
border-color: var(--cc-color-border-neutral-disabled, #eee);
background: var(--cc-color-bg-neutral-disabled);
}
Expand All @@ -588,7 +588,7 @@ export class CcInputText extends LitElement {
.skeleton .ring,
.skeleton:hover .ring,
.skeleton .input:hover + .ring {
border-color: #eee;
border-color: var(--cc-color-border-neutral-disabled, #eee);
background-color: var(--cc-color-bg-neutral-disabled);
cursor: progress;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/cc-select/cc-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export class CcSelect extends LitElement {
}
select[disabled] {
border-color: var(--cc-color-bg-neutral-disabled);
border-color: var(--cc-color-border-neutral-disabled, #777);
background: var(--cc-color-bg-neutral-disabled);
color: var(--cc-color-text-weak);
opacity: 1;
Expand Down
4 changes: 4 additions & 0 deletions src/styles/default-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@
* For instance: block & card borders */
--cc-color-border-neutral: var(--color-grey-30);

/* Usage: for disabled borders
* For instance: disabled input / select borders */
--cc-color-border-neutral-disabled: var(--color-grey-15);

/* Usage: for contrasted borders.
* For instance: click targets like input fields */
--cc-color-border-neutral-strong: var(--color-grey-50);
Expand Down

0 comments on commit 3034296

Please sign in to comment.