-
Notifications
You must be signed in to change notification settings - Fork 204
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
fix: minor linting updates #4113
Conversation
🦋 Changeset detectedLatest commit: c046b31 The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
File metricsSummaryTotal size: 1.44 MB*
File change detailsalertbanner
assetcard
card
coachmark
combobox
dial
page
sidenav
stepper
treeview
* An ASCII character in UTF-8 is 8 bits or 1 byte. |
📚 Branch previewPR #4113 has been deployed to Azure Blob Storage: https://spectrumcss.z13.web.core.windows.net/pr-4113/index.html. |
--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 comment
The 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.
@@ -12,25 +12,23 @@ | |||
*/ | |||
|
|||
.spectrum-AlertBanner { | |||
--spectrum-alert-banner-neutral-background: var(--spectrum-neutral-subdued-background-color-default); |
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.
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate (and identical) definitions removed.
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Using rgb
shorthand instead of rgba
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Unused custom property
@@ -11,49 +11,7 @@ | |||
* governing permissions and limitations under the License. | |||
*/ | |||
|
|||
@media (forced-colors: active) { |
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.
Moved this down to the bottom to match the format of other components.
.spectrum-SideNav { | ||
--spectrum-sidenav-background-hover: var(--spectrum-gray-100); |
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.
These were all duplicate definitions.
@@ -72,6 +72,11 @@ | |||
--spectrum-numberfield-spacing-block-start-edge-to-text: var(--spectrum-component-top-to-text-100); | |||
--spectrum-numberfield-spacing-block-end-edge-to-text: var(--spectrum-component-bottom-to-text-100); | |||
|
|||
/* Button size and offset (to properly position the validation icons/padding) */ | |||
--spectrum-numberfield-button-inline-padding: var(--spectrum-in-field-button-side-edge-to-fill-medium); |
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.
Pulled these up because the variables below here use these definitions.
@@ -103,10 +103,10 @@ | |||
--spectrum-numberfield-spacing-min-inline-end-value-to-icon: var(--spectrum-text-to-visual-75); | |||
--spectrum-numberfield-spacing-validation-icon-to-stepper: calc(var(--spectrum-number-field-visual-to-in-field-stepper-small) - var(--spectrum-numberfield-button-inline-padding)); | |||
|
|||
--spectrum-numberfield-button-inline-padding: var(--spectrum-infield-button-inline-edge-to-fill, var(--spectrum-in-field-button-side-edge-to-fill-small)); |
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.
We don't have access to the definitions for --spectrum-infield-button-inline-edge-to-fill
at this spot in the DOM
@@ -186,6 +186,7 @@ module.exports = { | |||
/^--mod-/, | |||
/^--system-/, | |||
/^--spectrum-picked-color$/, | |||
/^--spectrum-downstate-(height|width)$/, |
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.
Added this as a global exception that is allowed to be empty.
a830436
to
ebd5ae1
Compare
843b332
to
421ca59
Compare
421ca59
to
c046b31
Compare
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.
Looks great! ✨
Description
This PR addresses CSS linting warnings present on the
spectrum-two
branch. The changes include:--spectrum-alert-banner-neutral-background
)rgba()
torgb()
where appropriateword-wrap
→overflow-wrap
)Motivation and context
These are minor linting fixes that improve code quality and consistency without affecting component functionality or appearance.
Author's checklist
Reviewer's checklist
patch
,minor
, ormajor
featuresManual review test cases
Verify no visual regressions in affected components