✍️ New Article: First Look at The Modern attr() I explored the new attr() capabilities and shared my thoughts about it. Happy reading! ishadeed.com/article/mode...
Post
It seems you had the confusion I see a lot. Keyword values are not "string" but "custom-ident" so you can use the value auto (as well as other keyword) like below: [mx] { margin-inline: attr(mx type(<custom-ident>)); } codepen.io/t_afif/pen/p...
codepen.ioUntitled...
0 reposts7 likes
Or you can choose to allow `auto` explicitly (if that’s the only keyword you want to support): ``` margin-inline: attr(mx type(<length> | auto)); ``` Demo: codepen.io/bramus/pen/e...
codepen.ioYes, attr() works with auto...