Get the latest tech news
The attr() function in CSS now supports types
The attr() function in CSS is a powerful function that allows you to use the value of an attribute of an HTML element as the value of a CSS property. This function is commonly used with the content property in pseudo-elements to display the value of an attribute on the page.
This function is commonly used with the content property in pseudo-elements to display the value of an attribute on the page. Notice, in this example, we are using only one common class box to customize the width of the div elements based on the value of the data-width attribute. If you enjoy my work ( the articles, the open-source projects, my general demeanour... anything really), consider leaving a tip& supporting the site.
Or read this on Hacker News