-
Notifications
You must be signed in to change notification settings - Fork 207
fix: minor linting updates #4113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
"@spectrum-css/coachindicator": patch | ||
"@spectrum-css/alertbanner": patch | ||
"@spectrum-css/colorhandle": patch | ||
"@spectrum-css/colorslider": patch | ||
"@spectrum-css/inlinealert": patch | ||
"@spectrum-css/breadcrumb": patch | ||
"@spectrum-css/colorwheel": patch | ||
"@spectrum-css/datepicker": patch | ||
"@spectrum-css/assetcard": patch | ||
"@spectrum-css/thumbnail": patch | ||
"@spectrum-css/calendar": patch | ||
"@spectrum-css/combobox": patch | ||
"@spectrum-css/dropzone": patch | ||
"@spectrum-css/treeview": patch | ||
"@spectrum-css/underlay": patch | ||
"@spectrum-css/sidenav": patch | ||
"@spectrum-css/stepper": patch | ||
"@spectrum-css/card": patch | ||
"@spectrum-css/dial": patch | ||
"@spectrum-css/page": patch | ||
"@spectrum-css/well": patch | ||
--- | ||
|
||
## Minor linting fixes | ||
|
||
- Removed unused custom properties across multiple components | ||
- Fixed color function notation by converting `rgba()` to `rgb()` where appropriate | ||
- Removed duplicate custom property declarations | ||
- Fixed deprecated CSS properties (e.g., `word-wrap` → `overflow-wrap`) | ||
- Removed unnecessary stylelint-disable comments | ||
|
||
_No visual or functional changes to components._ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,25 +12,23 @@ | |
*/ | ||
|
||
.spectrum-AlertBanner { | ||
--spectrum-alert-banner-neutral-background: var(--spectrum-neutral-subdued-background-color-default); | ||
|
||
--spectrum-alert-banner-min-height: var(--spectrum-alert-banner-minimum-height); | ||
--spectrum-alert-banner-max-inline-size: var(--spectrum-alert-banner-width); | ||
--spectrum-alert-banner-inline-size: auto; | ||
|
||
--spectrum-alert-banner-font-size: var(--spectrum-font-size-100); | ||
--spectrum-alert-banner-line-height: var(--spectrum-line-height-100); | ||
--spectrum-alert-banner-font-family: var(--spectrum-sans-font-family-stack); | ||
--spectrum-alert-banner-icon-size: var(--spectrum-workflow-icon-size-100); /* stylelint-disable-line spectrum-tools/no-unused-custom-properties -- used in passthrough */ | ||
--spectrum-alert-banner-icon-size: var(--spectrum-workflow-icon-size-100); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unnecessary lint ignore rule; passthroughs are accounted for by the no-unused-custom-properties plugin. |
||
|
||
/* spacing */ | ||
--spectrum-alert-banner-icon-to-text: var(--spectrum-text-to-visual-300); | ||
--spectrum-alert-banner-inline-start-to-content: var(--spectrum-spacing-300); | ||
--spectrum-alert-banner-inline-end-to-content: var(--spectrum-spacing-300); | ||
--spectrum-alert-banner-text-to-button-horizontal: var(--spectrum-spacing-300); | ||
--spectrum-alert-banner-block-edge-to-button: var(--spectrum-spacing-200); | ||
--spectrum-alert-banner-close-button-to-content: var(--spectrum-spacing-300); /* stylelint-disable-line spectrum-tools/no-unused-custom-properties -- used in passthrough */ | ||
--spectrum-alert-banner-close-button-to-inline-end: var(--spectrum-alert-banner-close-button-spacing); /* stylelint-disable-line spectrum-tools/no-unused-custom-properties -- used in passthrough */ | ||
--spectrum-alert-banner-close-button-to-content: var(--spectrum-spacing-300); | ||
--spectrum-alert-banner-close-button-to-inline-end: var(--spectrum-alert-banner-close-button-spacing); | ||
|
||
/* Top and bottom margins for AlertBanner-text. Subtracts the vertical spacing that is already included in the | ||
padding-block of its parent AlertBanner-body element. */ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,15 +13,11 @@ | |
|
||
/* outer container, unstyled */ | ||
.spectrum-AssetCard { | ||
--spectrum-assetcard-overlay-background-color: rgba(27 127 245 / 10%); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate (and identical) definitions removed. |
||
--spectrum-assetcard-background-color: var(--spectrum-gray-75); | ||
--spectrum-assetcard-selectionindicator-background-color-default: rgba(var(--spectrum-gray-75-rgb), 0.9); | ||
--spectrum-assetcard-selectionindicator-box-shadow-color: var(--spectrum-transparent-black-300); | ||
|
||
/* todo: this isn't quite the size from the XD file as 232px is not a size token, so we use 224px */ | ||
--spectrum-assetcard-asset-size: 224px; | ||
--spectrum-assetcard-background-color: var(--spectrum-gray-75); | ||
--spectrum-assetcard-overlay-background-color: rgba(27 127 245 / 10%); | ||
--spectrum-assetcard-overlay-background-color: rgb(27 127 245 / 10%); | ||
--spectrum-assetcard-asset-animation-duration: var(--spectrum-animation-duration-100); | ||
--spectrum-assetcard-asset-container-border-size: 1px; | ||
--spectrum-assetcard-header-margin-block-start: var(--spectrum-spacing-300); | ||
|
@@ -42,7 +38,7 @@ | |
--spectrum-assetcard-selectionindicator-color: var(--spectrum-white); | ||
--spectrum-assetcard-selectionindicator-font-weight: var(--spectrum-bold-font-weight); | ||
--spectrum-assetcard-selectionindicator-font-size: var(--spectrum-font-size-400); | ||
--spectrum-assetcard-selectionindicator-background-color-default: rgba(var(--spectrum-gray-75-rgb), 0.9); | ||
--spectrum-assetcard-selectionindicator-background-color-default: rgb(var(--spectrum-gray-75-rgb), 0.9); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using |
||
--spectrum-assetcard-selectionindicator-box-shadow-color: var(--spectrum-transparent-black-300); | ||
|
||
/* title */ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,8 +65,6 @@ | |
/* Selected */ | ||
--spectrum-card-selected-background-opacity: var(--mod-card-selected-background-opacity, 0.1); /* table-selected-row-background-opacity does not exist in tokens yet */ | ||
|
||
--spectrum-card-preview-border-width-selected: var(--mod-card-preview-border-width-selected, var(--spectrum-border-width-100)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unused custom property |
||
|
||
/* Horizontal */ | ||
--spectrum-card-horizontal-body-padding: var(--mod-card-horizontal-body-padding, var(--spectrum-spacing-300)); | ||
--spectrum-card-horizontal-preview-padding: var(--mod-card-horizontal-preview-padding, var(--spectrum-spacing-200)); | ||
|
@@ -378,7 +376,7 @@ | |
} | ||
|
||
&.is-selected .spectrum-Card-preview::before { | ||
background-color: rgba(var(--mod-card-selected-background-color-rgb, var(--spectrum-card-selected-background-color-rgb)), var(--mod-card-selected-background-opacity, var(--spectrum-card-selected-background-opacity))); | ||
background-color: rgb(var(--mod-card-selected-background-color-rgb, var(--spectrum-card-selected-background-color-rgb)), var(--mod-card-selected-background-opacity, var(--spectrum-card-selected-background-opacity))); | ||
} | ||
|
||
.spectrum-Card-body { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,7 +119,7 @@ | |
|
||
/* Wrapper element around the nested action menu sub-component */ | ||
.spectrum-CoachMark-action-menu { | ||
--mod-popover-content-area-spacing: var(--spectrum-popover-content-area-spacing); | ||
--mod-popover-content-area-spacing: var(--spectrum-popover-edge-to-content-area); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The variable name before is defined inside |
||
|
||
white-space: nowrap; | ||
z-index: 1; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -208,13 +208,13 @@ | |
} | ||
|
||
&.is-invalid .spectrum-Combobox-input:read-only { | ||
border-color: var(--highcontrast-textfield-border-color-invalid-default, var(--mod-textfield-border-color-invalid-default, var(--spectrum-combobox-readonly-border-color-invalid-default))); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These high contrast variables were removed at some point so are showing up now as undefined. |
||
border-color: var(--highcontrast-combobox-border-color-invalid, var(--mod-textfield-border-color-invalid-default, var(--spectrum-combobox-readonly-border-color-invalid-default))); | ||
} | ||
|
||
&.is-disabled .spectrum-Combobox-input:read-only { | ||
background-color: var(--mod-textfield-background-color-disabled, var(--spectrum-combobox-readonly-background-color-disabled)); | ||
border-color: var(--mod-combobox-readonly-border-color-disabled, var(--spectrum-combobox-readonly-border-color-disabled, transparent)); | ||
color: var(--highcontrast-textfield-text-color-disabled, var(--mod-textfield-text-color-disabled, var(--spectrum-combobox-readonly-text-color-disabled))); | ||
color: var(--mod-textfield-text-color-disabled, var(--spectrum-combobox-readonly-text-color-disabled)); | ||
|
||
&:hover { | ||
background-color: var(--mod-textfield-background-color-disabled, var(--spectrum-combobox-readonly-background-color-disabled)); | ||
|
@@ -378,7 +378,7 @@ | |
border-color: var(--spectrum-combobox-border-color-default); | ||
box-shadow: 0 0 0 30px var(--highcontrast-combobox-background-color-default, var(--spectrum-combobox-background-color-default)) inset !important; | ||
transition: background-color 200ms ease-in-out 0s; | ||
-webkit-text-fill-color: var(--highcontrast-textfield-text-color-default, var(--spectrum-neutral-content-color-default)) !important; | ||
-webkit-text-fill-color: var(--spectrum-neutral-content-color-default) !important; | ||
line-height: var(--spectrum-combobox-line-height); | ||
|
||
&::selection { | ||
|
@@ -392,7 +392,7 @@ | |
|
||
.spectrum-HelpText-text { | ||
inline-size: 100%; | ||
word-wrap: break-word; | ||
overflow-wrap: break-word; | ||
text-wrap: wrap; | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,6 @@ | |
*/ | ||
|
||
.spectrum-DatePicker { | ||
--spectrum-datepicker-initial-height: var(--spectrum-component-height-100); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate (and identical) definition |
||
|
||
--spectrum-datepicker-border-radius: var(--mod-datepicker-border-radius, var(--spectrum-corner-radius-100)); | ||
--spectrum-datepicker-border-radius-quiet: var(--mod-datepicker-border-radius-quiet, 0); | ||
--spectrum-datepicker-border-width: var(--spectrum-border-width-100); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,8 +25,6 @@ | |
|
||
--spectrum-dial-min-max-tick-color: var(--spectrum-gray-600); | ||
|
||
--spectrum-dial-handle-marker-color-key-focus: var(--spectrum-gray-25); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate definition |
||
|
||
--spectrum-dial-label-text-color: var(--spectrum-gray-700); | ||
--spectrum-dial-label-text-color-disabled: var(--spectrum-gray-700); | ||
--spectrum-dial-handle-border-color-disabled: var(--spectrum-gray-400); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,11 @@ | |
*/ | ||
|
||
:root { | ||
background: var(--mod-page-background, var(--spectrum-page-background-color, var(--spectrum-gray-75))); | ||
--spectrum-page-background-color: var(--mod-page-background, var(--spectrum-gray-75)); | ||
--spectrum-page-content-tap-highlight: var(--mod-page-content-tap-highlight, var(--spectrum-transparent-black-25)); | ||
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pulled these variables out of the inline-use to match our standard approach for other components. |
||
|
||
background: var(--spectrum-page-background-color); | ||
|
||
/* The highlight that appears over a link while it's being tapped */ | ||
-webkit-tap-highlight-color: var(--mod-page-content-tap-highlight, var(--spectrum-page-content-tap-highlight, var(--spectrum-transparent-black-25))); | ||
-webkit-tap-highlight-color: var(--spectrum-page-content-tap-highlight); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused custom property.