scriptex/css-diagnostics

Add this snippet (and adjust it)

Closed this issue · 1 comments

html:not([lang]),
html[lang=""] {
  border: 5px solid red;
}

head,
head *:not(title) {
  display: block;
}

meta[charset]:not([charset="UTF-8"])::before {
  content: "CSS Diagnostics: Bad charset: " attr(charset) " ";
  display: block;
  color: red;
}

meta[charset]:not(:first-child)::after {
  content: "CSS Diagnostics: Bad charset: not first child";
  display: block;
  color: red;
}

meta[name="viewport"][content*="user-scalable=no"]::after,
meta[name="viewport"][content*="maximum-scale"]::after,
meta[name="viewport"][content*="minimum-scale"]::after {
  content: " • Bad viewport: " attr(content);
  display: block;
  color: red;
}

script[type="text/javascript"]::before {
  content: " • Unnecessary type attribute on script: " attr(type);
  display: block;
  color: red;
}

link[rel="stylesheet"][type="text/css"]::before {
  content: " • Unnecessary type attribute on link: " attr(type);
  display: block;
  color: red;
}

Done in #11