- We can use inline styles in HTML, and we can also use
<script>
to write JavaScript within the HTML document or we can inline it, too. - In JavaScript, we can work with the DOM elements via selectors such as
document.querySelectorAll()
, and we can also modify their appearance through classes (e.g.className
) or inline styles. - In CSS, we can target the DOM elements via CSS selectors. No JavaScript. CSS preprocessors are helpful in making our CSS look a little bit more like JavaScript (variables, mixins, functions), but that code lives in its own sandbox and our scripts do not have access to it.
Were there ever any plans to support JavaScript within CSS? What are the arguments for and against this?