Re: [csswg-drafts] [css-values] Re-adding min() and max()?

> For instance, if you pass 0° and 90°, there are two arcs: one is 90° and the other 270°.

That's if you treat the angles as just points on a circle, where spinning 360deg gives you the exact same point.  We don't do that in CSS - angles are numbers like anything else; 0deg and 360deg might map to the same direction in the end, but they're treated as completely distinct values otherwise.  (So you can, for example, animate from `rotate: 0deg;` to `rotate: 360deg;` to make something do a complete spin.)

So in CSS, if you give 0deg and 90deg, there's only one "arc", going from 0 and 90.  Between 0deg and 270deg there's only one "arc", going from 0 to 270.  If you want the "small" arc in that second case, use the angles property: specify -90deg and 0deg, or 270deg and 360deg.

This does suggest that there might be justification for modding angles, for when 0deg and 360deg really *are* exactly the same for a given application.  But it shouldn't be built into clamp().

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

Received on Tuesday, 15 August 2017 19:36:11 UTC