Elektrine lite

← Feed

@leaverou@front-end.social

Post #814962

2026-03-26 22:21 UTC

🚨 Want mixins in CSS? Help the @csswg by telling us what feels natural to you! Look at the code in the screenshot. What resulting widths would you find least surprising? A: All get 100px B: div gets 100px, div > h2 gets 200px, div + p gets 300px C: div gets 100px, div > h2 gets 200px, div + p gets no width* D: div and div > h2 get 100px, div + p gets no width* * from the mixin Poll in https://front-end.social/@leaverou/116297811172593173 Please answer based on what feels natural *to you*, it's not a quiz.

Replies (7)

  • @leaverou@front-end.social 2026-03-26 22:22

    Question in https://front-end.social/@leaverou/116297807826814028

    Open ##2392945

  • @mez@mastodon.nz 2026-03-26 22:28

    @leaverou@front-end.social What am I missing to potentially mean that `p` would have no width?

    Open ##2392968

  • @gumnos@mastodon.bsd.cafe 2026-03-26 22:56

    @leaverou@front-end.social Should the image show "width: 100px", "width: 200px", "width: 300px" instead of "font-size: 10px", "font-size: 20px", and "font-size: 30px"? The image has no 100/200/300 in it…

    Open ##2392974

  • @seiz@mastodon.social 2026-03-26 23:20

    @leaverou@front-end.social 10em is passed to the mixin if i read the screenshot correctly, so the Answer would be 10em (for all, hopefully), not 100px. Or what are my old eyes missing?

    Open ##2392977

  • @MaxArt2501@mastodon.social 2026-03-27 04:49

    @leaverou@front-end.social To me, it should be equivalent of replacing the `@apply` line with the content of `@Result@mastodon.social` (using the value passed as the argument), that's all. Just like SASS. So option B feels the most natural to me. https://sass-lang.com/playground/#eJwzNHTIzazIzFNIy8/XUEksStdUqOZSAAI1HQU1BTuFDCMQra1QABVWUCjPTCnJsFIAqbUGC9Vy1XJxpWSWgVU4ZOYl55SmpILNMzRIzdUEKUrLzyvRLc6sSrVSMDQoqLAG6gBpABkP1oUkb4QkD7MWSdoYIg0ATdkyNg==

    Open ##2392980

  • @mariejulien@mastodon.social 2026-03-27 08:56

    @leaverou@front-end.social

    Open ##2392982

  • @vruz@mstdn.social 2026-03-31 04:16

    @leaverou@front-end.social @csswg@bird.makeup Has CSS achieved omniscience yet?

    Open ##2392983