This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var | |
| choices = ['rock','paper','scissors'], // Classic version | |
| // choices = ['cockroach','foot','nuke'], // Foot crushes cockroach, nuke blows up foot, cockroach survives nuke. | |
| // choices = ['rock','paper','scissors','spock','lizard'], // Rock-Paper-Scissor-Spock-Lizard version | |
| choicesCount = choices.length, | |
| promptString = (function(choices){ | |
| var string = '', | |
| c = choicesCount - 1; | |
| for (var i = 0; i <= c; i++) { | |
| string += (i === 0) ? capitalize(choices[i]) : choices[i]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * CSS image crop. Forces image to 4:3 aspect ratio cropping at the middle. | |
| * http://dabblet.com/gist/4711695 | |
| */ | |
| .img-crop, | |
| .img-crop img{ | |
| width: 100%; /* gotta be responsive these days */ | |
| } | |
| .img-crop{ | |
| background-color: #ededed; /* some background color for short images */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * CSS image crop. Forces image to 4:3 aspect ratio cropping at the middle. | |
| */ | |
| .img-crop{ | |
| background-color: #ededed; | |
| overflow: hidden; | |
| width: 100%; | |
| } | |
| .img-crop img{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>Tiny data-uri image strings</title> | |
| <style> | |
| .image-sample{ | |
| border: 1px solid; | |
| } | |
| </style> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Testing 123 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * testing units | |
| */ | |
| body{ | |
| text-align: center; | |
| } | |
| #box{ | |
| background-color: red; | |
| display: inline-block; | |
| width: 200px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // sass 3.2 or higher required | |
| @mixin respond-to($min-width, $max-width: null) { | |
| $fix-mqs: false !default; | |
| // If we're outputting for a fixed media query set... | |
| @if $fix-mqs { | |
| // ...and if we should apply these rules... | |
| @if $max-width != null { | |
| @if (($fix-mqs >= $min-width) and ($fix-mqs <= $max-width)) { | |
| // ...output the content the user gave us. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @file | |
| * Default theme implementation to display a block. | |
| * | |
| * Available variables: | |
| * - $block->subject: Block title. | |
| * - $content: Block content. | |
| * - $block->module: Module that generated the block. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <!--[if IE 8]> <html lang="sv-SE" class="no-js ie8"> <![endif]--> | |
| <!--[if gt IE 8]><!--> <html lang="sv-SE" class="no-js"> <!--<![endif]--> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Breakpoint detection test</title> | |
| <style type="text/css" media="screen"> | |
| @media screen and (min-width: 320px) { | |
| #page:after { | |
| content: 'smallest'; /* represent the current width-bracket */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * CSS Arrow icons | |
| */ | |
| .widget { | |
| overflow: hidden; | |
| position:relative; | |
| text-indent: -999em; /* hide text from view */ | |
| } | |
| .widget:before, |
NewerOlder