Skip to content

Instantly share code, notes, and snippets.

View martinwolf's full-sized avatar
🐺

Martin Wolf martinwolf

🐺
View GitHub Profile
@martinwolf
martinwolf / Preferences.sublime-settings
Last active October 8, 2015 19:18
Sublime Text 2 preferences
{
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"file_exclude_patterns":
[
".DS_Store",
"._*"
],
"folder_exclude_patterns":
@martinwolf
martinwolf / homescreen-or-not.js
Last active December 16, 2015 12:19
JS: Homescreen App or not
if(navigator.standalone === undefined || !!navigator.standalone) {
// if added to home screen do this
} else {
// if opened in mobile safari do this
}
@martinwolf
martinwolf / screen-reader.scss
Last active December 17, 2015 01:49
CSS: screen-reader
.sr {
color: transparent;
font: 0/0 a;
text-shadow: none;
background-color: transparent;
border: 0;
}
@martinwolf
martinwolf / input-camera.html
Created May 7, 2013 21:05
HTML: Input type file with camera access
<input type="file" accept="image/" capture="camera">
@martinwolf
martinwolf / _simple-grid.scss
Last active May 14, 2016 00:39
SCSS: Simple Grid
$width-grid: 940px;
$grid-gap: 20px;
// $grid-padding: $grid-gap/2;
$grid-item-1-2: ($width-grid - $grid-gap) / 2;
$grid-item-1-3: ($width-grid - ($grid-gap * 2)) / 3;
$grid-item-1-4: ($width-grid - ($grid-gap * 3)) / 4;
$grid-item-1-5: ($width-grid - ($grid-gap * 4)) / 5;
$grid-item-1-6: ($width-grid - ($grid-gap * 5)) / 6;
@martinwolf
martinwolf / _mixin_placeholder-color.scss
Created May 10, 2013 13:38
SCSS: Mixin: Placeholder Color
@mixin placeholder($color) {
&::-webkit-input-placeholder {
color: $color;
}
&:-moz-placeholder {
color: $color;
}
&:-ms-input-placeholder {
color: $color;
}
@martinwolf
martinwolf / _mixin_font.scss
Created May 14, 2013 10:33
SCSS: Mixin: Font with optional vars
@mixin font-base($weight: normal, $style: normal) {
font-family: 'Proxima Nova', Arial, sans-serif;
font-weight: $weight;
font-style: $style;
}
@martinwolf
martinwolf / _fonts.scss
Last active December 17, 2015 08:59
SCSS: Mixin: Web Font Icons
@font-face {
font-family: 'Icons';
src: url('../fonts/icons.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@martinwolf
martinwolf / gist:5597351
Last active December 17, 2015 10:49
JS: Two events, load and resize
$(window).on('load resize', function() {
// do something
});
@martinwolf
martinwolf / gist:5651954
Created May 26, 2013 07:09
JS: document or window ready
jQuery(document).ready(function() {
// DOM is loaded
});
jQuery(window).ready(function() {
// DOM and all ressources are loaded
});