Skip to content

Instantly share code, notes, and snippets.

View nicohaemhouts's full-sized avatar

Nico Haemhouts nicohaemhouts

  • Sydney, Australia
View GitHub Profile
@nicohaemhouts
nicohaemhouts / _.md
Last active August 29, 2015 14:24
CDS EventsPerSecond
@nicohaemhouts
nicohaemhouts / _.md
Last active August 29, 2015 14:24
CDS EventsPerSecond 2
body {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
}
@nicohaemhouts
nicohaemhouts / Affix-and-stack-elements-at-the-top-of-the-screen-on-scroll..markdown
Created March 25, 2015 14:06
Affix and stack elements at the top of the screen on scroll.

Affix and stack elements at the top of the screen on scroll.

Kind of like the affix plugin in Twitter Bootstrap, but this one automatically calculates the top offset. It creates a nice stack of elements under the fixed navbar at the top of the screen.

A Pen by Nico Haemhouts on CodePen.

License.

@nicohaemhouts
nicohaemhouts / Pasting-multi-line-text-into-a-single-line-text-input-in-Internet-Explorer.markdown
Created March 23, 2015 11:45
Pasting multi-line text into a single-line text input in Internet Explorer

Pasting multi-line text into a single-line text input in Internet Explorer

When you paste multi-line text into a single-line text input in Internet Explorer you only get the first line. This is because IE chucks away everything after the first newline-character. Other browsers will simply replace the newline with spaces. This snippet does the same thing for IE. If window.clipboardData exists we're on IE and we should intercept the paste event to replace newlines with spaces.

A Pen by Nico Haemhouts on CodePen.

License.

Dropcap

Show the first letter of the first paragraph larger and in a different color than the rest of the text, using the ::first-letter selector.

A Pen by Nico Haemhouts on CodePen.

License.