Skip to content

Commit

Permalink
Fixed text contrast issues in Menu, Dropdown, ComboBox and ListBox an…
Browse files Browse the repository at this point in the history
…d removed some deprecated token usage (#4195)
  • Loading branch information
joshwooding authored Sep 27, 2024
1 parent 4f3bec9 commit 7eac3b2
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/metal-pumas-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@salt-ds/core": patch
---

Fixed text contrast issues in Menu, Dropdown, ComboBox and ListBox.
2 changes: 1 addition & 1 deletion packages/core/src/file-drop-zone/FileDropZone.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.saltFileDropZone {
color: var(--saltFileDropZone-text-color, var(--salt-text-primary-foreground));
color: var(--saltFileDropZone-text-color, var(--salt-content-primary-foreground));
display: inline-flex;
background: var(--saltFileDropZone-background, var(--salt-container-primary-background));
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/menu/MenuGroup.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.saltMenuGroup-label {
background: var(--salt-container-primary-background);
color: var(--salt-text-secondary-foreground);
color: var(--salt-content-secondary-foreground);
font-size: var(--salt-text-label-fontSize);
font-weight: var(--salt-text-label-fontWeight-strong);
font-family: var(--salt-text-label-fontFamily);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/menu/MenuItem.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
.saltMenuItem[aria-disabled="true"],
.saltMenuItem[aria-disabled="true"]:active {
background: var(--salt-selectable-background-disabled);
color: var(--salt-text-primary-foreground-disabled);
color: var(--salt-content-primary-foreground-disabled);
cursor: var(--salt-selectable-cursor-disabled);
box-shadow: none;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/option/OptionGroup.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.saltOptionGroup-label {
background: var(--salt-container-primary-background);
color: var(--salt-text-secondary-foreground);
color: var(--salt-content-secondary-foreground);
font-size: var(--salt-text-label-fontSize);
font-weight: var(--salt-text-label-fontWeight-strong);
font-family: var(--salt-text-label-fontFamily);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/overlay/OverlayPanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
background: var(--overlay-background);
box-shadow: var(--saltOverlay-boxShadow, var(--salt-overlayable-shadow-popout));

color: var(--saltOverlay-text-color, var(--salt-text-primary-foreground));
color: var(--saltOverlay-text-color, var(--salt-content-primary-foreground));
z-index: var(--saltOverlay-zIndex, var(--salt-zIndex-flyover));
width: max-content;
}
2 changes: 1 addition & 1 deletion packages/core/src/panel/Panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
color: var(--saltPanel-color, inherit);
height: var(--saltPanel-height, 100%);
overflow: auto;
padding: var(--saltPanel-padding, var(--salt-size-container-spacing));
padding: var(--saltPanel-padding, var(--salt-spacing-300));
width: var(--saltPanel-width, 100%);
border-radius: var(--saltPanel-borderRadius, var(--salt-palette-corner, 0));
box-sizing: border-box;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/tooltip/Tooltip.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--tooltip-background: var(--saltTooltip-background, var(--salt-container-primary-background));
--tooltip-zIndex: var(--saltTooltip-zIndex, var(--salt-zIndex-flyover));
/* apply icon margin based on the text line height so it's aligned on all densities */
--tooltip-icon-marginTop: calc((var(--salt-text-lineHeight) - max(var(--salt-icon-size-base), 12px)) / 2);
--tooltip-icon-marginTop: calc((var(--salt-text-lineHeight) - max(var(--salt-size-icon), 12px)) / 2);
--tooltip-status-borderColor: var(--salt-container-primary-borderColor);
/* Single line height should be size-base */
--tooltip-padding: calc(var(--salt-spacing-75) - var(--salt-size-border)) var(--salt-spacing-100);
Expand Down

0 comments on commit 7eac3b2

Please sign in to comment.