Skip to content

Instantly share code, notes, and snippets.

View since1976's full-sized avatar

Daniel Eberhardt since1976

  • Auckland, New Zealand
View GitHub Profile
@timkelty
timkelty / _mixins.scss
Created January 15, 2013 16:58
Vertically center with inline-block and a dummy element
// Vertically center with inline-block and a dummy element
// @mixin vertically-center-child
// @see http://css-tricks.com/centering-in-the-unknown/
@mixin vertically-center-child(
$child-selector: "&:first-child",
$font-size: $base-font-size,
$collapse-white-space: if($font-size, true, false),
$dummy-selector: "&:before"
) {
@if $collapse-white-space {
@iso100
iso100 / XHR-Mega-Menu.html
Created November 8, 2012 18:27
XHR-loaded megamenu content
HTML Markup:
<ul id="primary-nav" role="navigation">
<li id="nav_home" class="current"><a href="homepage.html">Home</a></li>
<li id="nav_products" class="hasMenu"><a href="overview.html">Products</a><div class="megamenu get-remote-content" data-remote-url="/nav_products.html" style="display:none"></div></li>
<li id="nav_shop"><a href="#">Shop</a></li>
</ul>
Script (requires jQuery):
@anthonyshort
anthonyshort / _paths.scss
Created November 7, 2012 04:07
Path Functions
@function icon-url($path) {
@return url("../../assets/icons/#{$path}");
}
@function bg-url($path) {
@return url("../../assets/bg/#{$path}");
}
@function asset-url($path) {
@return url("../../assets/#{$path}");
@plapier
plapier / Typekit font mixin.scss
Created October 31, 2012 18:39
Sass Mixin for typekit variation-specific font-family names
Sass Mixin for typekit variation-specific font-family names
Typekit IE6-8 Support (http://help.typekit.com/customer/portal/articles/6855-Using-multiple-weights-and-styles)
$lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
$georgia: Georgia, Cambria, "Times New Roman", Times, serif;
// Must include fallbacks for EACH typekit font — set them each as variables
//************************************************************************//
$typekit-fonts: "source-sans-pro", "ff-tisa-web-pro"; // index [1, 2]
@croxton
croxton / stash_nested_embeds.md
Created October 29, 2012 14:23
Stash & template partials - nested embed

Required:

Stash 2.3.4 (beta) or later

Stash template directory

	/layouts/
		standard.html

	/partials/

listing.html