Skip to content

Conversation

KristinLBradley
Copy link
Contributor

@KristinLBradley KristinLBradley commented Aug 26, 2025

📌 Summary

If merged, this PR removes/fixes SCSS styles which compile to invalid CSS.

Previews of affected component Showcases:

(See disabled states, no visible changes should be observed)

🛠️ Detailed description

Where hds-button-state-disabled mixin is used:

  • button.scss
    • one usage:
    .hds-button {
      // ...
      &:disabled,
      &[disabled],
      &.mock-disabled,
      &:disabled:focus,
      &[disabled]:focus,
      &.mock-disabled:focus,
      &:disabled:hover,
      &[disabled]:hover,
      &.mock-disabled:hover {
        @include hds-button-state-disabled();
      }
      // ...
    }
    
  • dropdown.scss
    • two usages:
    .hds-dropdown-toggle-icon {
      // ...
      &:disabled,
      &.mock-disabled {
        @include hds-button-state-disabled();
      }
    }
    
    .hds-dropdown-toggle-button {
      // ...
      &:disabled,
      &.mock-disabled,
      &:disabled:focus,
      &.mock-disabled:focus,
      &:disabled:hover,
      &.mock-disabled:hover {
        @include hds-button-state-disabled();
        // ...
      }
    }
    
  • file-input.scss
    • one usage:
    .hds-form-file-input {
      &:disabled,
      &[disabled],
      &.mock-disabled,
      &:disabled:focus,
      &[disabled]:focus,
      &.mock-disabled:focus,
      &:disabled:hover,
      &[disabled]:hover,
      &.mock-disabled:hover {
        // ...
        &::file-selector-button {
          @include hds-button-state-disabled();
          // ...
        }
      }
    }
    

🔗 External links


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

📋 PCI review checklist
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've worked with GRC to document the impact of any changes to security controls.
    Examples of changes to controls include access controls, encryption, logging, etc.
  • If applicable, I've worked with GRC to ensure compliance due to a significant change to the in-scope PCI environment.
    Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.

Copy link

vercel bot commented Aug 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
hds-showcase Ready Ready Preview Aug 27, 2025 6:47pm
hds-website Ready Ready Preview Aug 27, 2025 6:47pm


&::before {
border-color: transparent;
}
Copy link
Contributor Author

@KristinLBradley KristinLBradley Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Result of deleting this style:

  • ::file-selector-button::before & similar styles no longer exist in the compiled CSS output (packages/components/dist/styles/@hashicorp/design-system-components.css)
  • There are no Percy diffs

didoo
didoo previously approved these changes Aug 27, 2025
Co-authored-by: Cristiano Rastelli <[email protected]>
didoo
didoo previously approved these changes Aug 27, 2025
@KristinLBradley KristinLBradley requested a review from dchyun August 27, 2025 18:43
@KristinLBradley KristinLBradley merged commit 125e175 into main Sep 2, 2025
16 checks passed
@KristinLBradley KristinLBradley deleted the kristin/hds-5314-fix-invalid-css branch September 2, 2025 16:23
@hashibot-hds hashibot-hds mentioned this pull request Sep 2, 2025
@alex-ju alex-ju added this to the [email protected] milestone Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants