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

I think the most logical option from a usage standpoint would be to calculate the random number when a rule is applied to an element. It should only be recalculated if that rule has been removed and then added again (class addition/removal, hover triggered etc). 

That would allow for the random value to persist and update controllably rather than in some undefined fashion whenever the browser feels like it and would mean multiple elements targeted by the same selector would receive a different random value. I'm not sure how easy it would be for a browser to implement though.



-- 
GitHub Notification of comment by JamesCoyle
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2826#issuecomment-455237591 using your GitHub account

Received on Thursday, 17 January 2019 16:31:25 UTC