mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 02:46:16 -08:00
fix(downloads): use native disabled card styles
This commit is contained in:
1 parent
1ec0f444e4
commit
eff978d626
2 files changed
+18
-15
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user