Skip to content

Commit

Permalink
refactor(contentcard): removed borderSecondary colors and fixed media…
Browse files Browse the repository at this point in the history
… overlapping with border
  • Loading branch information
masoudmanson committed Feb 27, 2025
1 parent 1f23d20 commit 946c469
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,10 @@
--sds-color-semantic-base-border-primary-hover: #000000;
--sds-color-semantic-base-border-primary-hover-inverse: #ffffff;
--sds-color-semantic-base-border-primary-inverse: #c3c3c3;
--sds-color-semantic-base-border-primary-on-fill: #ffffff;
--sds-color-semantic-base-border-on-fill: #ffffff;
--sds-color-semantic-base-border-primary-pressed: #000000;
--sds-color-semantic-base-border-primary-pressed-inverse: #ffffff;
--sds-color-semantic-base-border-secondary: #c3c3c3;
--sds-color-semantic-base-border-secondary-hover: #969696;
--sds-color-semantic-base-border-secondary-pressed: #3b3b3b;
--sds-color-semantic-base-border-secondary-disabled: #dfdfdf;
--sds-color-semantic-base-divider: #dfdfdf;
--sds-color-semantic-base-divider-inverse: #6c6c6c;
--sds-color-semantic-base-fill-disabled: #dfdfdf;
Expand Down Expand Up @@ -615,13 +612,10 @@
--sds-color-semantic-base-border-primary-hover: #ffffff;
--sds-color-semantic-base-border-primary-hover-inverse: #000000;
--sds-color-semantic-base-border-primary-inverse: #696969;
--sds-color-semantic-base-border-primary-on-fill: #000000;
--sds-color-semantic-base-border-on-fill: #000000;
--sds-color-semantic-base-border-primary-pressed: #ffffff;
--sds-color-semantic-base-border-primary-pressed-inverse: #000000;
--sds-color-semantic-base-border-secondary: #696969;
--sds-color-semantic-base-border-secondary-hover: #aaaaaa;
--sds-color-semantic-base-border-secondary-pressed: #ededed;
--sds-color-semantic-base-border-secondary-disabled: #494949;
--sds-color-semantic-base-divider: #494949;
--sds-color-semantic-base-divider-inverse: #cdcdcd;
--sds-color-semantic-base-fill-disabled: #494949;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"value": "{sds.color.primitive.gray.300.value}",
"darkValue": "{sds.color.primitive.gray.300.darkValue}"
},
"border-primary-on-fill": {
"border-on-fill": {
"value": "{sds.color.primitive.gray.50.value}",
"darkValue": "{sds.color.primitive.gray.50.darkValue}"
},
Expand All @@ -138,18 +138,6 @@
"value": "{sds.color.primitive.gray.300.value}",
"darkValue": "{sds.color.primitive.gray.300.darkValue}"
},
"border-secondary-hover": {
"value": "{sds.color.primitive.gray.500.value}",
"darkValue": "{sds.color.primitive.gray.500.darkValue}"
},
"border-secondary-pressed": {
"value": "{sds.color.primitive.gray.700.value}",
"darkValue": "{sds.color.primitive.gray.700.darkValue}"
},
"border-secondary-disabled": {
"value": "{sds.color.primitive.gray.200.value}",
"darkValue": "{sds.color.primitive.gray.200.darkValue}"
},
"divider": {
"value": "{sds.color.primitive.gray.200.value}",
"darkValue": "{sds.color.primitive.gray.200.darkValue}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1169,13 +1169,10 @@
"sds-color-semantic-base-border-primary-hover": "#ffffff",
"sds-color-semantic-base-border-primary-hover-inverse": "#000000",
"sds-color-semantic-base-border-primary-inverse": "#696969",
"sds-color-semantic-base-border-primary-on-fill": "#000000",
"sds-color-semantic-base-border-on-fill": "#000000",
"sds-color-semantic-base-border-primary-pressed": "#ffffff",
"sds-color-semantic-base-border-primary-pressed-inverse": "#000000",
"sds-color-semantic-base-border-secondary": "#696969",
"sds-color-semantic-base-border-secondary-hover": "#aaaaaa",
"sds-color-semantic-base-border-secondary-pressed": "#ededed",
"sds-color-semantic-base-border-secondary-disabled": "#494949",
"sds-color-semantic-base-divider": "#494949",
"sds-color-semantic-base-divider-inverse": "#cdcdcd",
"sds-color-semantic-base-fill-disabled": "#494949",
Expand Down Expand Up @@ -1341,13 +1338,10 @@
"sds-color-semantic-base-border-primary-hover": "#000000",
"sds-color-semantic-base-border-primary-hover-inverse": "#ffffff",
"sds-color-semantic-base-border-primary-inverse": "#c3c3c3",
"sds-color-semantic-base-border-primary-on-fill": "#ffffff",
"sds-color-semantic-base-border-on-fill": "#ffffff",
"sds-color-semantic-base-border-primary-pressed": "#000000",
"sds-color-semantic-base-border-primary-pressed-inverse": "#ffffff",
"sds-color-semantic-base-border-secondary": "#c3c3c3",
"sds-color-semantic-base-border-secondary-hover": "#969696",
"sds-color-semantic-base-border-secondary-pressed": "#3b3b3b",
"sds-color-semantic-base-border-secondary-disabled": "#dfdfdf",
"sds-color-semantic-base-divider": "#dfdfdf",
"sds-color-semantic-base-divider-inverse": "#6c6c6c",
"sds-color-semantic-base-fill-disabled": "#dfdfdf",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,20 +199,14 @@ $sds-color-semantic-base-border-primary-hover-inverse: #ffffff;
$sds-color-semantic-base-border-primary-hover-inverse-dark: #000000;
$sds-color-semantic-base-border-primary-inverse: #c3c3c3;
$sds-color-semantic-base-border-primary-inverse-dark: #696969;
$sds-color-semantic-base-border-primary-on-fill: #ffffff;
$sds-color-semantic-base-border-primary-on-fill-dark: #000000;
$sds-color-semantic-base-border-on-fill: #ffffff;
$sds-color-semantic-base-border-on-fill-dark: #000000;
$sds-color-semantic-base-border-primary-pressed: #000000;
$sds-color-semantic-base-border-primary-pressed-dark: #ffffff;
$sds-color-semantic-base-border-primary-pressed-inverse: #ffffff;
$sds-color-semantic-base-border-primary-pressed-inverse-dark: #000000;
$sds-color-semantic-base-border-secondary: #c3c3c3;
$sds-color-semantic-base-border-secondary-dark: #696969;
$sds-color-semantic-base-border-secondary-hover: #969696;
$sds-color-semantic-base-border-secondary-hover-dark: #aaaaaa;
$sds-color-semantic-base-border-secondary-pressed: #3b3b3b;
$sds-color-semantic-base-border-secondary-pressed-dark: #ededed;
$sds-color-semantic-base-border-secondary-disabled: #dfdfdf;
$sds-color-semantic-base-border-secondary-disabled-dark: #494949;
$sds-color-semantic-base-divider: #dfdfdf;
$sds-color-semantic-base-divider-dark: #494949;
$sds-color-semantic-base-divider-inverse: #6c6c6c;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const ContentCardImageMedia = forwardRef<
maxHeight: sdsType === "narrow" ? imageSize : "100%",
maxWidth: sdsType === "narrow" ? "100%" : imageSize,
minHeight: imageSize,
minWidth: imageSize,
minWidth: sdsType === "narrow" ? "unset" : imageSize,
width: "100%",
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const NarrowPrimaryNavItem = (props: PrimaryNavItemProps): SerializedStyles => {
: colors?.base.backgroundSecondary;

const activeBorderColor = hasInvertedStyle
? colors?.base?.borderPrimaryOnFill
? colors?.base?.borderOnFill
: colors?.accent?.border;

const inactiveBorderColor = hasInvertedStyle
Expand Down Expand Up @@ -88,11 +88,11 @@ const WideStyledLabel = (props: PrimaryNavItemProps): SerializedStyles => {
const spaces = getSpaces(props);

const activeBorderColor = hasInvertedStyle
? colors?.base?.borderPrimaryOnFill
? colors?.base?.borderOnFill
: colors?.accent?.border;

const inactiveBorderColor = hasInvertedStyle
? colors?.base.borderPrimaryOnFill
? colors?.base.borderOnFill
: colors?.base.borderPrimary;

return css`
Expand Down
10 changes: 2 additions & 8 deletions packages/components/src/core/styles/common/makeThemeOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,16 @@ export const SDSPaletteLight = (appTheme: AppTheme): SDSPalette => {
backgroundSecondary: appTheme.colors.gray[100],
backgroundSecondaryInverse: appTheme.colors.gray[700],
backgroundTertiary: appTheme.colors.gray[200],
borderOnFill: appTheme.colors.gray[50]!,
borderPrimary: appTheme.colors.gray[600],
borderPrimaryDisabled: appTheme.colors.gray[300],
borderPrimaryDisabledInverse: appTheme.colors.gray[600],
borderPrimaryHover: appTheme.colors.gray[900]!,
borderPrimaryHoverInverse: appTheme.colors.gray[50]!,
borderPrimaryInverse: appTheme.colors.gray[300],
borderPrimaryOnFill: appTheme.colors.gray[50]!,
borderPrimaryPressed: appTheme.colors.gray[900]!,
borderPrimaryPressedInverse: appTheme.colors.gray[50]!,
borderSecondary: appTheme.colors.gray[300],
borderSecondaryDisabled: appTheme.colors.gray[200],
borderSecondaryHover: appTheme.colors.gray[500],
borderSecondaryPressed: appTheme.colors.gray[700],
divider: appTheme.colors.gray[200],
dividerInverse: appTheme.colors.gray[600],
fillDisabled: appTheme.colors.gray[200],
Expand Down Expand Up @@ -171,19 +168,16 @@ export const SDSPaletteDark = (appTheme: AppTheme): SDSPalette => {
backgroundSecondary: appTheme.colors.gray[100],
backgroundSecondaryInverse: appTheme.colors.gray[700],
backgroundTertiary: appTheme.colors.gray[200],
borderOnFill: appTheme.colors.gray[50]!,
borderPrimary: appTheme.colors.gray[600],
borderPrimaryDisabled: appTheme.colors.gray[300],
borderPrimaryDisabledInverse: appTheme.colors.gray[600],
borderPrimaryHover: appTheme.colors.gray[900]!,
borderPrimaryHoverInverse: appTheme.colors.gray[50]!,
borderPrimaryInverse: appTheme.colors.gray[300],
borderPrimaryOnFill: appTheme.colors.gray[50]!,
borderPrimaryPressed: appTheme.colors.gray[900]!,
borderPrimaryPressedInverse: appTheme.colors.gray[50]!,
borderSecondary: appTheme.colors.gray[300],
borderSecondaryDisabled: appTheme.colors.gray[200],
borderSecondaryHover: appTheme.colors.gray[500],
borderSecondaryPressed: appTheme.colors.gray[700],
divider: appTheme.colors.gray[200],
dividerInverse: appTheme.colors.gray[600],
fillDisabled: appTheme.colors.gray[200],
Expand Down
5 changes: 1 addition & 4 deletions packages/components/src/core/styles/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,11 @@ export interface BaseColor {
borderSecondary: string;
borderPrimaryHover: string;
borderPrimaryHoverInverse: string;
borderSecondaryHover: string;
borderPrimaryOnFill: string;
borderOnFill: string;
borderPrimaryPressed: string;
borderPrimaryPressedInverse: string;
borderSecondaryPressed: string;
borderPrimaryDisabled: string;
borderPrimaryDisabledInverse: string;
borderSecondaryDisabled: string;
ornamentDisabled: string;
ornamentDisabledInverse: string;
ornamentOnFill: string;
Expand Down

0 comments on commit 946c469

Please sign in to comment.