StackExchange / Stacks

Stack Overflow’s Design System
https://stackoverflow.design
MIT License
602 stars 89 forks source link

feat(badge): add `NEW` badge #1647

Closed dancormier closed 4 months ago

dancormier commented 5 months ago

STACKS-529

https://deploy-preview-1647--stacks.netlify.app/product/components/badges/#badge-states


Dark mode contrast (as of Tue Feb 13, 2024)

The dark mode version of the "new" badge doesn’t meet our APCA Lc 60 minimum.

Terminal output on accessibility test run ```sh ❌ badge > a11y: s-badge-dark-new should be accessible Error: Accessibility Violations --- Rule: color-contrast-apca-custom Impact: serious Elements must meet APCA conformance minimums thresholds ( Issue target: span Context: badge Fix all of the following: Element has insufficient APCA custom level contrast of 52.46Lc (foreground color: #adb1fa, background color: #363a87, font size: 9.0pt (12px), font weight: 700). Expected minimum APCA lightness contrast of 60Lc ```

Should we a) alter the badge colors specifically for dark mode, b) alter the colors for both light/dark mode, or c) alter purple values in dark mode so purple-400 and purple 100 result in >= Lc 60?

See also: Jira comment

netlify[bot] commented 5 months ago

Deploy Preview for stacks ready!

Name Link
Latest commit 8e79293e8a0c02b518b64ae735c000107753b64f
Latest deploy log https://app.netlify.com/sites/stacks/deploys/65cfc4ddd3fc8000080834cc
Deploy Preview https://deploy-preview-1647--stacks.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.