Elektrine lite

← Feed

@bramus@front-end.social

Post #1009691

2026-03-27 08:39 UTC

RE: https://front-end.social/@leaverou/116297807826814028 Before you blindly say 100px–200px–300px, hear me out: https://github.com/LeaVerou/blog/discussions/137#discussioncomment-16340589 (And if you really want it to be 100px–200px–300px then it’s simple: don’t type the --arg)

Replies (4)

  • @Schepp@mastodon.social 2026-03-27 09:13

    @bramus@front-end.social makes sense! Thank you for chiming in 😊

    Open ##3130004

  • @bramus@front-end.social damn it. I have voted first and then saw your explanation. You‘re opinion should be the one that gets used in the end!

    Open ##3130005

  • @leaverou@front-end.social 2026-03-27 14:32

    @bramus@front-end.social Yes, but also… https://github.com/LeaVerou/blog/discussions/137#discussioncomment-16344301

    Open ##3130006

  • @westbrook@mastodon.social 2026-03-27 14:57

    @bramus@front-end.social I'd argue the the use of `--arg` makes the application of the value local, which aligns more to this: https://codepen.io/Westbrook/pen/raMJByv than to what you've shared. Maybe that's not _how_ mixins work, but it's definitely how I'd read them. Your example feels more like the mixin is: ```css :root { --foo: 10em; } @mixin --foo() { @Result@mastodon.social { &, & > h2, & + p { width: var(--foo); } } } ```

    Open ##3130007