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
/** | |
* Iron Man suitcase | |
*/ | |
* { box-sizing: border-box; } | |
.container { padding: 20px; } | |
.iron_title { | |
text-align: center; | |
font-family: stark; | |
color: red; |
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
/** | |
* Iron Man suitcase | |
*/ | |
* { box-sizing: border-box; } | |
.container { padding: 20px; } | |
.iron_title { | |
text-align: center; | |
font-family: stark; | |
color: red; |
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
// Object Constructor | |
var Suit = function(name){ | |
// Private value | |
var name = name; | |
// Private function | |
function getName(){ | |
return name; | |
} |
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
/** | |
* Javasting :) | |
*/ | |
var start_with_space = function (string) { | |
return /^\s+\S+\s*$/.test(string) | |
} | |
var is_blank = function(string) { | |
return /^\s*$/.test(string) |
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
/** | |
* Bottom floated elements stack | |
*/ | |
body { background: #999; font-family: Helvetica; } | |
* { box-sizing: border-box; } | |
.cf:before,.cf:after { content: " "; display: table; } | |
.cf:after { clear: both; } | |
.the-dialog { width:500px; background: #fff; margin: 10px auto; box-shadow: 0 0 5px; } | |
.the-dialog__top { background: #eee url('https://dl.dropboxusercontent.com/u/31132753/pics/small_bg.jpg'); background-size:cover; background-position:50% 25%; padding: 20px; } |
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
/** | |
* zindex-test | |
*/ | |
.cnt { max-width: 200px; margin: 10px auto; } | |
.box { background: #fff; border: 1px solid; height: 50px; margin-bottom: 10px; position:relative; /*z-index: 50;*/ } | |
.hint-trigger { position: absolute; bottom: 0; } | |
.hint { position: absolute; top:0; background: #eee; padding: 10px; z-index: 100; } |
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 test_str = 'test\n\n\nha\n\n\n\n\n\n\n\nbla\nbla\n'; | |
// Replace more than two \n with two \n | |
var data = test_str.replace(new RegExp('(\n){3,}', 'gim') , '\n\n'); | |
// normalize line endings to \n, because \r is not recognized as "end of line" | |
data = data.replace (/\s*\R/g, "\n"); | |
// remove leading and trailing whitespace | |
data = data.replace (/^\s*|[\t ]+$/gm, ""); |
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
/* | |
http://css-tricks.com/snippets/css/media-queries-for-standard-devices/ | |
*/ | |
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} |
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
/** | |
* indicator bubble | |
*/ | |
body { text-align: center; } | |
.bubble { | |
width: 50px; | |
height: 50px; | |
display: inline-block; | |
text-align: center; | |
background-color: #34a9f3; |
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
/** | |
* Psychedelia | |
*/ | |
/*background: #f06;*/ | |
/*background: linear-gradient(45deg, #f06, yellow);*/ | |
/*min-height: 100%;*/ | |
.ball { | |
width: 15px; | |
height: 15px; |