New capabilities for attr()
Read OriginalThe article details new, powerful capabilities for the CSS attr() function, shipping in Chrome 133. It now supports typed values like colors, numbers, and percentages, allowing developers to use HTML attribute data directly in CSS properties beyond the `content` property. This enables more semantic, dynamic styling without inline styles or JavaScript, as demonstrated with a product card color selector example.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser