top | item 44980692

(no title)

scragz | 6 months ago

first they came for my javascript, then my python... now css?! these type-heads need to chill.

discuss

order

notpushkin|6 months ago

Eh, CSS is inherently typed. My only concern is, why specify types in attr() and not just infer them (like the rest of CSS does)?

eyelidlessness|6 months ago

Because HTML attributes are inherently stringly typed. Where CSS can propagate types, it’s because the CSS parser and object model are involved. For that to work with attr() would almost certainly involve extending that machinery into all aspects of the HTML spec, and then all that machinery too. Which is probably impractical for more reasons than I can think of, but I can think of several.