Skip to content

Instantly share code, notes, and snippets.

@moxley
Created September 17, 2012 22:24
Show Gist options
  • Save moxley/3740160 to your computer and use it in GitHub Desktop.
Save moxley/3740160 to your computer and use it in GitHub Desktop.
CSS Critique
/*
* CSS Critique - How many issues can you find in this stylesheet?
*/
.blue-black-select {
background-color: white;
}
#background {
width:100%;
height:100%;
left:0px;
}
#content {
margin-left:0px !important;
margin-top:25px !important;
}
#cb {
padding:10px 10px;
}
#drop_down_menu {
top:-25px;
left:-10px;
}
#event-bar{
padding-top:4px;
padding-bottom:7px;
}
@moxley
Copy link
Author

moxley commented Sep 17, 2012

The name "background" makes for a poor ID, because is too general of a name for something so specific.

@moxley
Copy link
Author

moxley commented Sep 17, 2012

Inconsistent naming conventions for IDs: #drop_down_menu, #event.

@moxley
Copy link
Author

moxley commented Sep 17, 2012

Inconsistent code spacing convention: #event_bar{ versus #drop_down_menu {, and background-color: white; versus width:100%;

@moxley
Copy link
Author

moxley commented Sep 17, 2012

Use of !important keyword. Almost never needed.

@moxley
Copy link
Author

moxley commented Sep 17, 2012

Use of negative values (top:-25px;) is suspect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment