close

May 2024 only! Join our Discord free of charge.

Slick­Stack
Lightning-fast WordPress on Nginx

When to use CSS vs. JS for WordPress best practices?

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #4359 Reply
    Rebecca
    Guest

    CSS is easier for me but some of the new features are kind of hacky IMO… it just seems like some guys trying to do too much with CSS.

    I stumbled on this post

    https://gomakethings.com/when-to-use-css-vs.-javascript/

    #4360 Reply
    Robert
    Guest

    great quote from it

    A few years ago, there was an obsession with finding creative CSS hacks for things that would normally be done in JS.

    A CSS-only expand/collapse navigation menu is the one that jumps to mind. Here’s an example. These are really cool examples of pushing CSS farther and thinking about code creatively, but…

    The results are often wildly inaccessible.

    #4361 Reply
    Carolyn
    Guest

    I think one problem with JS is that nobody ever knows which “JS” you are talking about, that is vanilla javascript, jQuery, React, Vue, some other frameworks or can be anything.

    CSS, well is CSS (mostly)

    #4362 Reply
    Zachary
    Guest

    JS frameworks have created a generation of JS snobs…..

    https://daveceddia.com/love-js-hate-css/

    #4376 Reply
    Joshua
    Guest

    😂

    #7889 Reply
    Judy
    Guest

    mostly CSS is better, because its lighter and faster. but it depends on what you’re trying to do because CSS3 can require too many declarations to do something that JS only needs a few lines to accomplish (and maybe more reliable)

    #9649 Reply
    Dylan
    Guest
Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: When to use CSS vs. JS for WordPress best practices?

Thanks to our generous sponsors for their support!