diff --git a/libs/portal/downloads/feature/src/lib/download-library.component.scss b/libs/portal/downloads/feature/src/lib/download-library.component.scss index 881cf8eb3..d1820c097 100644 --- a/libs/portal/downloads/feature/src/lib/download-library.component.scss +++ b/libs/portal/downloads/feature/src/lib/download-library.component.scss @@ -92,18 +92,10 @@ transition: transform 180ms ease; } - &:hover:not([aria-disabled='true']) img, - &:focus-visible:not([aria-disabled='true']) img { + &:hover:not(:disabled) img, + &:focus-visible:not(:disabled) img { transform: scale(1.025); } - - &--disabled { - cursor: not-allowed; - - img { - filter: saturate(0.72); - } - } } .download-library__placeholder { @@ -157,11 +149,6 @@ text-align: left; -webkit-box-orient: vertical; -webkit-line-clamp: 2; - - &--disabled { - color: var(--app-muted-color); - cursor: not-allowed; - } } .download-library__facts, diff --git a/libs/portal/downloads/feature/src/lib/download-library.component.spec.ts b/libs/portal/downloads/feature/src/lib/download-library.component.spec.ts index 67b32e4e3..61855ad94 100644 --- a/libs/portal/downloads/feature/src/lib/download-library.component.spec.ts +++ b/libs/portal/downloads/feature/src/lib/download-library.component.spec.ts @@ -524,4 +524,20 @@ describe('DownloadLibraryComponent', () => { 'grid-template-columns: repeat(2, minmax(0, 1fr))' ); }); + + it('uses native disabled states for ready-card action styling', () => { + const styles = readFileSync( + join(__dirname, 'download-library.component.scss'), + 'utf8' + ); + const disabledRule = + styles.match(/button:disabled\s*\{([^}]*)\}/)?.[1] ?? ''; + + expect(styles).toContain('&:hover:not(:disabled) img'); + expect(styles).toContain('&:focus-visible:not(:disabled) img'); + expect(styles).not.toContain("[aria-disabled='true']"); + expect(styles).not.toContain('&--disabled'); + expect(disabledRule).toContain('cursor: default'); + expect(disabledRule).toContain('opacity: 0.48'); + }); });