Slashdot Mirror


CSS To Get Support For Trigonometry Functions (zdnet.com)

CSS, or the language that styles and arranges how page elements appear on a website, will soon get support for trigonometry functions such as sine, cosine, tangent, and others, ZDNet is reporting. From the report: The new trigonometry functions were approved at the end of February in a meeting of the World Wide Web Consortium (W3C) CSS Working Group. The new functions approved and set to join the CSS standard are: Sine - sin(), cosine - cos(), tangent - tan(), arccosine - acos(), arcsine - asin(), arctangent - atan(), arctangent (of two numbers x and y) - atan2(), square root - sqrt(), square root of the sum of squares of its arguments - hypot(), and power of - pow().

13 of 135 comments (clear)

  1. pfft by cascadingstylesheet · · Score: 3, Funny

    Can it do statistics? That's what I want to know ...

  2. Soon you will mine cryptocrrency with CSS by xack · · Score: 4, Funny

    Whats with all the js, css, wasm, webgl malware vectors, but hey no more flash right?

  3. Re:Why? by GeLeTo · · Score: 4, Informative

    This is needed for CSS animations. Now you can do some things like moving an object along a sine path with CSS transitions, but this will be more powerful and in many cases - more intuitive.

  4. interesting by Anonymous Coward · · Score: 3, Insightful

    Taking javascript out of the equation is more than welcome.

  5. Re:Why? by Anonymous Coward · · Score: 3, Insightful

    Great, because the average webpage didn't use enough CPU time without this.

  6. Re:Why? by SuricouRaven · · Score: 2

    More importantly, if you have sine, you can easily incorporates circles into your layout. A whole new class of stylish but unintuitive interface is open now!

  7. Objokes by nospam007 · · Score: 4, Funny

    A nerd was invited to compete in the Trigonometry Mathletic Competition...
    he said:
    "Sine me up!"

    Catholics fail trigonometry because they're afraid of sin
    Irish people fail trigonometry because they can't tan.
    Everyone else fails trigonometry just cos.

    My girlfriend has a trigonometry fetish.
    Every time we talk, she gets off on a tangent.

    My teacher frowned at me when I handed in my trigonometry test paper.
    I don't think that's a good sine

  8. Trigonometry functions?! by DontBeAMoran · · Score: 4, Insightful

    How about adding support for simple constants first?!

    const myColor=#0F0;

    body
    {
    background: myColor;
    }

    Yes, I know... CSS pre-processors, yadda yadda yadda... but every time you add a tool to your system, it's another security risk, another thing to slow your system down.

    --
    #DeleteFacebook
    1. Re:Trigonometry functions?! by dmt0 · · Score: 4, Informative

      Actually that exists in native CSS: https://developer.mozilla.org/...

      Alas, as long as you need support for dreaded IE11, you're out of luck: https://caniuse.com/#feat=css-...

  9. Re:Why? by slack_justyb · · Score: 4, Funny

    A lot of people around here seem to base a lot of their perceptions and priorities on what things were like 15 years ago.

    That's pretty much Slashdot in a nutshell. Shoot, say something like systemd, wayland, Java performance, IPv6 deployment, or cloud computing and you're likely to get a stack of punch cards thrown at you for being a heretic.

  10. Re:Why? by tepples · · Score: 2

    If you're using it for animation, you're using the wrong tool for the job.

    Then what is the right tool for the job, particularly if you're site's audience includes the sort of "I don't want any script in the browser, ever" tech purists who inhabit Slashdot?

  11. Such odd priorities by Medievalist · · Score: 4, Insightful

    The file upload button is unstylable. People write crazy amounts of browser-specific code to get around this - literally hundreds of lines of code, if you want to work responsively in all current browsers - because every other button can have style applied to it, but file upload buttons can't.

    Seriously. Working on trig functions when they haven't finished with buttons yet? That seems really strange to me.

  12. Re:Why? by Chelloveck · · Score: 3, Funny

    That's pretty much Slashdot in a nutshell. Shoot, say something like systemd, wayland, Java performance, IPv6 deployment, or cloud computing and you're likely to get a stack of punch cards thrown at you for being a heretic.

    Punch cards? Damned whippersnappers. Paper tape is all you need you little snots! Now, get off my lawn!

    --
    Chelloveck
    I give up on debugging. From now on, SIGSEGV is a feature.