Skip to content

Instantly share code, notes, and snippets.

@moxley
Created September 17, 2012 22:24
Show Gist options
  • Select an option

  • Save moxley/3740160 to your computer and use it in GitHub Desktop.

Select an option

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

moxley commented Sep 17, 2012

Copy link
Copy Markdown
Author

The class name .blue-black-select contains presentation specifics, "blue", "black".

@moxley

moxley commented Sep 17, 2012

Copy link
Copy Markdown
Author

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

@moxley

moxley commented Sep 17, 2012

Copy link
Copy Markdown
Author

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

@moxley

moxley commented Sep 17, 2012

Copy link
Copy Markdown
Author

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

@moxley

moxley commented Sep 17, 2012

Copy link
Copy Markdown
Author

Use of !important keyword. Almost never needed.

@moxley

moxley commented Sep 17, 2012

Copy link
Copy Markdown
Author

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