Check out a free preview of the full Accessibility in JavaScript Applications course

The "CSS in JS" Lesson is part of the full, Accessibility in JavaScript Applications course featured in this preview video. Here's what you'd learn in this lesson:

Marcy promotes the method of adding stable CSS class names in order to lower the barrier for users who want to create custom stylesheets.

Preview
Close

Transcript from the "CSS in JS" Lesson

[00:00:00]
>> Marcy Sutton: For working in JavaScript applications. A lot of times now, CSS is being written with JavaScript and in JavaScript. So it might be a good idea to add a stable CSS class. And I have an example of this, in the slides. So let's zoom out a little bit.

[00:00:20]
So in this presentation. I have some CSS in JS and you can observe that these CSS class names are randomly generated. And for a user to try and restyle that, like i hear about this on Twitter. People wanting to change the way that the Twitter interface works. If you add some stable class names, you can give users a bit more of a handle to write user style sheets.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now