jdan / 98.css

A design system for building faithful recreations of old UIs
https://jdan.github.io/98.css
MIT License
9k stars 296 forks source link

feat: button icons disabled state #163

Open arturbien opened 1 year ago

arturbien commented 1 year ago

Adds custom SVG filter for the disabled effect used across Win 98.

The filter is applied by default to images inside the <button />.

Screenshot 2023-03-25 at 23 13 10

Filter can also be used on any other element outside the button if needed:

Screenshot 2023-03-25 at 23 16 57

The filter unfortunately can not be inlined inside CSS because for some reason <feFlood /> is not working when inlined. Instead the SVG filter needs to be defined in the DOM, then referenced in CSS.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
98css ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 25, 2023 at 10:28PM (UTC)
arturbien commented 1 year ago

@jdan any thoughts on this PR? ☺️

juanigaray commented 11 months ago

This looks great! Would you add a comment to the SVG defs so users know that it's important to import them to their markup? If you do that + pull main I think we can merge this.