Joined March 2012
·

Rico Sta. Cruz

Internet Scientist at Nadarei
·
Manila, Philippines
·
·
·

Posted to Stylus is better than LESS and SASS over 1 year ago

Lack of support for nested media queries is still a bummer. And "is better" is hard to quantify—Stylus doesn't support things like conditionals and loops (if you ever need that sort of thing).

I also miss the mix(red, green, 50%) function of Sass.

Nonetheless, I personally do use Stylus quite often as I love the syntax as well!

Posted to pbcopy and pbpaste on Linux over 1 year ago

Nice tip! By the way, why not just check for the existence of xsel and the non-existence of pbcopy?

if ! which pbcopy >/dev/null && which xsel >/dev/null; then
  alias ...
end
Posted to css clearfix over 1 year ago

Thanks! I don't think there's a need to style :before though.

Posted to Blurring with pure CSS3 over 1 year ago

The "fallback" is letting the element show unblurred :)

Posted to Zebra table using only CSS3 over 1 year ago

I believe you can also use :nth-chilld(even) and :nth-child(odd). :)

Posted to Date to Integer over 1 year ago

Thanks! Might be fair to mention that the value is in milliseconds since epoch, unlike the seconds you might be used to.

Posted to Faster ESC in vim over 1 year ago

Curious: why <Left><C-[> and not <Esc>?

This has the caveat that .innerHTML with new tags will not work. This means that these examples will fail:

document.getElementById('hello').innerHTML = '<section>Yo!</section>';

$("p").append("<aside>Hola!</aside>")

To solve this as well, just use html5shiv.

<!--[if lt IE 9]><script src="dist/html5shiv.js"></script><![endif]-->
Posted to parseInt() can be dangerous over 1 year ago

@brokenseal There are legitimate uses for type coercing strings to integers. For instance, HTML attributes from the DOM are always strings, if you need it as a number, you'll still need to cast it.

@passcod Thanks for the tip on +"023"! One case this won't cover though is when you're working on a string with numbers and letters, with one typical case being parseInt("32px", 10).

Posted to Use tig (text-mode interface for git) over 1 year ago

Thanks! and brew install tig :)

Achievements
1,559 Karma
120,006 Total ProTip Views