Re: [csswg-drafts] [css-values] random() function (#2826)

> What would happen in case of unclear integers, e. g. rand-int(foo, 10pt, 5mm)?

rand-int() is integers only, not dimensions. But for rand-val(), it's not resolved until computed or used value time, so the start and end points are already fully absolutized, and thus totally clear.

> Could this be solved with counters instead, which are always integers?

Counters are... not something we want to build other features on top of. They have a *lot* of strange quirks.

> Before I comment on the proposals above, I just wanted to make sure we're philosophically on board with the idea of extending the capabilities of CSS as such.

*I* am, but I'm utopian about these things. ^_^ I've been thinking about randomness in CSS for many years. At bare minimum, exploring this space will serve as a great case-study for what we need to be sure that we expose for Houdini Custom Functions; I want to ensure that authors could create a `--rand-int()` function with this same functionality. So even if we never get this natively implemented, it'll still be useful.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at using your GitHub account

Received on Friday, 18 January 2019 19:34:27 UTC