Skip to main content
CSS-Tricks
  • Articles
  • Videos
  • Almanac
  • Newsletter
  • Guides
  • DigitalOcean
  • DO Community
Search

Articles Tagged
JavaScript

151 Articles
{
,

}
Direct link to the article Smarter Ways to Generate a Deep Nested HTML Structure
haml HTML JavaScript php preprocessing pug

Smarter Ways to Generate a Deep Nested HTML Structure

A look at using HTML preprocessors to generate HTML, particularly deeply nested HTML, which is useful for a variety of interesting browser art and experimentation.
Avatar of Ana Tudor
Ana Tudor on Oct 20, 2020 (Updated on Jul 7, 2021)
Direct link to the article The Flavors of Object-Oriented Programming (in JavaScript)
JavaScript oop

The Flavors of Object-Oriented Programming (in JavaScript)

In my research, I've found there are four approaches to Object-Oriented Programming in JavaScript. Which methods should I use? Which one is "the best" way? Here I'll present my findings along with information that may help you decide which is right for you.
Avatar of Zell Liew
Zell Liew on Sep 28, 2020 (Updated on Oct 29, 2020)
Direct link to the article Working with JavaScript Media Queries
JavaScript media queries

Working with JavaScript Media Queries

What’s the first thing that comes to mind when you think of media queries? Maybe something in a CSS file that looks like this:

body {
  background-color: plum;
}


@media (min-width: 768px) {
  body {
    background-color: tomato;
  }
}

CSS …

Avatar of Marko Ilic
Marko Ilic on Sep 7, 2020 (Updated on May 12, 2021)
Direct link to the article Nailing the Perfect Contrast Between Light Text and a Background Image
accessibility canvas JavaScript

Nailing the Perfect Contrast Between Light Text and a Background Image

Have you ever come across a site where light text is sitting on a light background image? If you have, you’ll know how difficult that is to read. A popular way to avoid that is to use a transparent overlay…

Avatar of Yaphi Berhanu
Yaphi Berhanu on Aug 7, 2020 (Updated on Aug 10, 2020)
Direct link to the article A Lightweight Masonry Solution
CSS grid JavaScript layout masonry

A Lightweight Masonry Solution

Back in May, I learned about Firefox adding masonry to CSS grid. Masonry layouts are something I’ve been wanting to do on my own from scratch for a very long time, but have never known where to start. So, naturally, …

Avatar of Ana Tudor
Ana Tudor on Aug 3, 2020
Direct link to the article Avoid Heavy Babel Transformations by (Sometimes) Not Writing Modern JavaScript
es6 JavaScript

Avoid Heavy Babel Transformations by (Sometimes) Not Writing Modern JavaScript

It’s hard to imagine writing production-ready JavaScript without a tool like Babel. It’s been an undisputed game-changer in making modern code accessible to a wide range of users. With this challenge largely out of the way, there’s not much …

Avatar of Alex MacArthur
Alex MacArthur on May 20, 2020
Direct link to the article The Anatomy of a Tablist Component in Vanilla JavaScript Versus React
accessibility accordion JavaScript react tabs

The Anatomy of a Tablist Component in Vanilla JavaScript Versus React

If you follow the undercurrent of the JavaScript community, there seems to be a divide as of late. It goes back over a decade. Really, this sort of strife has always been. Perhaps it is human nature.

Whenever a popular …

Avatar of Nathan Smith
Nathan Smith on May 5, 2020 (Updated on May 7, 2020)
JavaScript javascript framework performance

The Cost of Javascript Frameworks

I expect this post from Tim Kadlec to be quoted in every performance conference talk for the next few years. There is a lot of data here, so please check it out for yourself, but the short story is that …

Avatar of Chris Coyier
Chris Coyier on Apr 26, 2020
Direct link to the article Getting JavaScript to Talk to CSS and Sass
custom properties JavaScript Sass

Getting JavaScript to Talk to CSS and Sass

JavaScript and CSS have lived beside one another for upwards of 20 years. And yet it’s been remarkably tough to share data between them. There have been large attempts, sure. But, I have something simple and intuitive in mind — …

Avatar of Marko Ilic
Marko Ilic on Apr 3, 2020 (Updated on Aug 25, 2020)
Direct link to the article A Guide to Handling Browser Events
JavaScript

A Guide to Handling Browser Events

Direct Link

In this post, Sarah Chima walks us through how we can work with browser events, such as clicking, using JavaScript. There’s a ton of great info in here! If JavaScript isn’t your strong suit, I think this is the best …

Avatar of Robin Rendle
Shared by Robin Rendle on Mar 13, 2020
Direct link to the article Building an Images Gallery using PixiJS and WebGL
canvas JavaScript webgl

Building an Images Gallery using PixiJS and WebGL

Sometimes, we have to go a little further than HTML, CSS, and JavaScript to create the UI we need, and instead use other resources, like SVG, WebGL, canvas, and others.

For example, the most amazing effects can be created with …

Avatar of Luis Torres
Luis Torres on Feb 12, 2020
  • Newer
  • 1
  • ...
  • 2
  • 3
  • 4
  • ...
  • 14
  • Older

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • DigitalOcean
  • DigitalOcean Community
  • About DigitalOcean
  • Legal
  • Free Credit Offer
CSS-Tricks
  • Email
  • Guest Writing
  • Book
  • Advertising
Follow
  • Mastodon
  • Twitter
  • Instagram
  • YouTube
  • CodePen
  • iTunes
  • RSS
Back to Top