Skip to content

Instantly share code, notes, and snippets.

@quattromani
Created July 18, 2014 22:27
Show Gist options
  • Save quattromani/5004b72cb29b9de4aaaa to your computer and use it in GitHub Desktop.
Save quattromani/5004b72cb29b9de4aaaa to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div></div>
<br>
<a href="">link</a>
<br><br>
<strike>Don't use me anymore</strike>
<u>I'm deprecated</u>
<br>
// ----
// Sass (v3.3.10)
// Compass (v1.0.0.alpha.20)
// ----
/* ==========================================================================
Find and Highlight Mistakes in HTML
========================================================================== */
// Credit to Eric Meyer, and Chris Coyier
// for the article:
// http://css-tricks.com/snippets/css/css-diagnostics/
// Add this variable to your global stylesheet
$find-mistakes: true;
// Then in a separate scss file (i.e. _mistakes.scss)
@if $find-mistakes {
/* ==========================
Empty Elements
========================== */
div, span, li, p, td, th {
&:empty {
padding: 2em;
border: 2px dotted purple !important;
background-color: lighten(purple, 50%);
}
}
/* ==========================
Empty Attributes
========================== */
*[alt=""],
*[title=""],
*[class=""],
*[id=""],
a[href=""],
a[href="#"] {
border: 2px solid blue !important;
}
/* ==========================
Deprecated Elements
========================== */
applet,
basefont,
center,
dir,
font,
isindex,
menu,
s,
strike,
u {
border: 2px dotted red !important;
}
/* ==========================
Deprecated Attributes
========================== */
*[background],
*[bgcolor],
*[clear],
*[color],
*[compact],
*[noshade],
*[nowrap],
*[size],
*[start],
*[bottommargin],
*[leftmargin],
*[rightmargin],
*[topmargin],
*[marginheight],
*[marginwidth],
*[alink],
*[link],
*[text],
*[vlink],
*[align],
*[valign],
*[hspace],
*[vspace],
*[height],
*[width],
ul[type],
ol[type],
li[type] {
border: 2px solid red !important;
}
/* ==========================
Proposed Deprecated Elements
========================== */
input[type="button"],
big,
tt {
border: 2px dotted green !important;
}
/* ==========================
Proposed Deprecated Attributes
========================== */
*[border],
a[target],
table[cellpadding],
table[cellspacing],
*[name] {
border: 2px solid green !important;
}
}
/* ==========================================================================
Find and Highlight Mistakes in HTML
========================================================================== */
/* ==========================
Empty Elements
========================== */
div:empty, span:empty, li:empty, p:empty, td:empty, th:empty {
padding: 2em;
border: 2px dotted purple !important;
background-color: #ff80ff;
}
/* ==========================
Empty Attributes
========================== */
*[alt=""],
*[title=""],
*[class=""],
*[id=""],
a[href=""],
a[href="#"] {
border: 2px solid blue !important;
}
/* ==========================
Deprecated Elements
========================== */
applet,
basefont,
center,
dir,
font,
isindex,
menu,
s,
strike,
u {
border: 2px dotted red !important;
}
/* ==========================
Deprecated Attributes
========================== */
*[background],
*[bgcolor],
*[clear],
*[color],
*[compact],
*[noshade],
*[nowrap],
*[size],
*[start],
*[bottommargin],
*[leftmargin],
*[rightmargin],
*[topmargin],
*[marginheight],
*[marginwidth],
*[alink],
*[link],
*[text],
*[vlink],
*[align],
*[valign],
*[hspace],
*[vspace],
*[height],
*[width],
ul[type],
ol[type],
li[type] {
border: 2px solid red !important;
}
/* ==========================
Proposed Deprecated Elements
========================== */
input[type="button"],
big,
tt {
border: 2px dotted green !important;
}
/* ==========================
Proposed Deprecated Attributes
========================== */
*[border],
a[target],
table[cellpadding],
table[cellspacing],
*[name] {
border: 2px solid green !important;
}
<div></div>
<br>
<a href="">link</a>
<br><br>
<strike>Don't use me anymore</strike>
<u>I'm deprecated</u>
<br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment