Content pfp
Content
@
0 reply
0 recast
0 reaction

Darryl Yeo đŸ› ïž pfp
Darryl Yeo đŸ› ïž
@darrylyeo
In hindsight it was inevitable. Type-safe functional programming is coming to CSS. This means cascading property definitions will no longer just be bound by plain rules, cascade `@layer`s and `@media` queries, but any arbitrary composable hierarchical structure you wish. https://www.bram.us/2025/02/09/css-custom-functions-teaser/
3 replies
1 recast
5 reactions

nkemjika.eth pfp
nkemjika.eth
@nkemjika
tbh, this feels like a natural evolution, but do you think this lead to something like 'pure CSS functions' where the output only depends on the inputs, regardless of cascade context?. Because all I can think about is how it affects the cascading nature of css
1 reply
0 recast
1 reaction

Darryl Yeo đŸ› ïž pfp
Darryl Yeo đŸ› ïž
@darrylyeo
Yes! I could definitely see people using this to come up with new “methodologies” much like BEM, OOCSS or Tailwind that came before. In this case, restricting `@function` usage to only pure functions could allow you to avoid cascade overrides.
1 reply
0 recast
0 reaction

nkemjika.eth pfp
nkemjika.eth
@nkemjika
Makes perfect sense! Really looking forward to what the future holds!
0 reply
0 recast
1 reaction