December 2010
7 posts
2 tags
Maruku benefits in Jekyll
Right now I’m working through the documentation of the new super-Masonry plugin. I’m using Jekyll to generate the pages and the examples, in the same manner that I did for Intro to CSS 3D Transforms. Jekyll has Maruku built in, which comes with several benefits.
Automatic id attributes added to headers. i.e. Introduction - Current Support Environment
Dynamic generation of table of...
3 tags
Max border-width
Some browsers max-out border-width. In the fiddle below, where I set border-bottom-width: 9999px, WebKit browsers render only 1807px, Opera renders 2407px. Like a mad scientist, Firefox renders all ten-thousand-minus-one pixels.
Max border-width fiddle
2 tags
Extra parameters in setTimeout
setTimeout has optional parameters that can be used to pass in arguments into the timed-out function. From
the window.setTimeout - MDC Doc Center:
var timeoutID = window.setTimeout(func, delay, [param1, param2, ...]);
Useful for constructors when you want to use a constructor’s method in the setTimeout.
myAnimator.prototype.animate = function() {
// advance frame
this.frame++;
//...
2 tags
turn angle unit
Going through last year’s 24ways, I caught this nugget.
Natalie Downe:
Rotations can be specified in degrees, radians (rads) or grads). WebKit also supports turns unfortunately Firefox doesn’t just yet.
turn is a valid CSS3 angle unit. A year later after Ms. Downe’s article, WebKit is still the only platform to support it.
turn angle unit fiddle
1 tag
element.getBoundingClientRect - MDC Doc Center →
The returned value is a TextRectangle object, which contains read-only left, top, right and bottom properties describing the border-box, in pixels, with the top-left relative to the top-left of the viewport
Nice way to get the absolute position of any element in the DOM.
2 tags
bit.ly Pro End-to-End (e2e) Domains
Dan Drinkard:
via @ade3: This is really an epic read, worth the time… http://fxn.ws/fFXiFp
…
ALSO! bit.ly now uses custom shorteners when anyone shrinks a url on a domain they manage. How cool is that??
That’s pretty cool.
Upon Dan’s notice, I was jazzed to discover that bit.ly Pro service was open to the public, and free at that! I had been previously using...
2 tags
white-space: pre-wrap
For formatting code blocks, white-space: pre-wrap will preserve white spaces and also wrap lines inside the container.
white-space: pre-wrap fiddle