News for hackers. Stuff that matters.
Re:Ask HN: What's your most-used function that you wrote you... by dmix on Saturday July 16, 2011 @02:24PM (#2771317)
A designers most used function:

In SCSS I use a very simple mixin for rounded corners, something I use frequently when designing sites.

  @mixin radius($dist) {
    border-radius:$dist;
    -moz-border-radius:$dist;
    -webkit-border-radius:$dist;
    -khtml-border-radius:$dist;
    -webkit-background-clip:padding-box;
  }
Then in the class just add:

  @include radius(5px);
Re:Ask HN: What's your most-used function that you wrote you... by mgeraci on Saturday July 16, 2011 @02:47PM (#2771382)
You might like this boilerplate SASS file that I made to handle a bunch of this type of thing: https://github.com/mgeraci/Sass-Boilerplate

I also see this post explaining the presence of the -webkit-background-clip (http://tumble.sneak.co.nz/post/928998513/fixing-the-backgrou...), but I don't see that behavior in Safari 5. Potentially fixed? If not, I would certainly add that to my boilerplate.

Re:Ask HN: What's your most-used function that you wrote you... by georgefox on Saturday July 16, 2011 @04:11PM (#2771647)
Shouldn't border-radius (i.e., no vendor prefix) be last?
Re:Ask HN: What's your most-used function that you wrote you... by nathanappere on Saturday July 16, 2011 @03:27PM (#2771499)
Bourbon does this and much more : https://github.com/thoughtbot/bourbon