Skip to content

Instantly share code, notes, and snippets.

@max
Created August 18, 2011 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save max/1153901 to your computer and use it in GitHub Desktop.
Save max/1153901 to your computer and use it in GitHub Desktop.

Border Radius for Gecko

Declaring border-radius for specific corners is not the same in Webkit and Mozilla. That's why you get this in Firefox. Here's a good tool to help you with that (be sure to sort the attributes according to our CSS guide).

Best Practices that kill us in the long run

Things like this are best practices that will kill us in the long run because it's no obvious why you did this:

#apps-processes .sidebar .delta,
#apps-processes .sidebar input {
  float: right;
}

Even though we declare float: right; twice, this is a lot easier to maintain and figure out for other developers who inherit your code:

#apps-processes .sidebar .delta {
  float: right;
}

/* Now I can move this to the relevant place in the stylesheet. */

#apps-processes .sidebar input {
  float: right;
}

Declaring links with attribute selectors

If you declare links with attribute selectors you have to follow the (L)o(V)e (H)(A)te convention.

:link,
:visited {
  color: red;
}

:hover,
:active {
  color: blue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment