/* whoa! */
@media (scripting: none) {
}
.js-disabled {
  background-color: palevioletred;
  padding: 2rem;
  display: none;
}
@media (scripting: none) {
  /* fallback styles when JS is not supported */
  .js-disabled {
    /* fallback styles when JS is not supported */
    display: block;
  }
}

Reference: https://ryanmulligan.dev/blog/detect-js-support-in-css/