Used to provide structural templates.
Pattern
t-template-name
t-template-name--modifier-name
t-template-name__subcomponent-name--subcomponent-modifier-name
// the basics | |
* | |
+box-sizing(border-box) | |
@mixin width($percent, $alignment: null) | |
@if $percent == 33 | |
$percent: 33.334 | |
@if $percent == 66 | |
$percent: 66.667 |
// Add a getElementsByClassName function if the browser doesn't have one | |
// Limitation: only works with one class name | |
// Copyright: Eike Send http://eike.se/nd | |
// License: MIT License | |
if (!document.getElementsByClassName) { | |
document.getElementsByClassName = function(search) { | |
var d = document, elements, pattern, i, results = []; | |
if (d.querySelectorAll) { // IE8 | |
return d.querySelectorAll("." + search); |
<?php | |
add_image_size('thumbnail-bw', 400, 0, false); | |
add_filter('wp_generate_attachment_metadata','bw_images_filter'); | |
function bw_images_filter($meta) { | |
$file = wp_upload_dir(); | |
$file = trailingslashit($file['path']).$meta['sizes']['thumbnail-bw']['file']; | |
list($orig_w, $orig_h, $orig_type) = @getimagesize($file); | |
$image = wp_load_image($file); | |
imagefilter($image, IMG_FILTER_GRAYSCALE); |
Authored by Peter Rybin , Chrome DevTools team
In this short guide we'll review some new Chrome DevTools features for "function scope" and "internal properties" by exploring some base JavaScript language concepts.
Let's start with closures – one of the most famous things in JS. A closure is a function, that uses variables from outside. See an example:
<!DOCTYPE html> | |
<html lang="en"> | |
<title>Sectioning Content test</title> | |
<h1>This is an h1</h1> | |
<p>That h1 is the heading for the body (a sectioning root).</p> | |
<div> | |
<h1>This is another h1</h1> | |
<p>That h1 is inside a div so it is no different than the first h1.</p> | |
</div> | |
<section> |
// Imports ------------------------------------------------------------------- | |
@import "compass/reset" | |
@import "compass/typography" | |
@import "compass/css3" | |
@import "compass/layout" | |
@import "compass/utilities" | |
@import "compass/typography/vertical_rhythm" | |
//Grid ------------------------------------------------------------------ | |
//Sorry susy has to be imported |
* { outline: 1px solid red; } | |
@include border-box-sizing(); | |
body { | |
//@include baseline-grid-background($base-line-height); | |
} | |
#page { | |
//@include susy-grid-background; | |
@include container; |
//----------------------------------------------------------------------------- | |
// Grid Settings | |
$total-columns : 4; | |
$column-width : 4.5em; | |
$gutter-width : 1.5em; | |
$grid-padding : $gutter-width; | |
//----------------------------------------------------------------------------- | |
// Responsive Variables |
//----------------------------------------------------------------------------- | |
// Grid Settings | |
$total-columns : 4; | |
$column-width : 4.5em; | |
$gutter-width : 1.5em; | |
$grid-padding : $gutter-width; | |
//----------------------------------------------------------------------------- | |
// Responsive Variables |