Skip to content

Instantly share code, notes, and snippets.

View uxmoon's full-sized avatar
🏠
Working from home

Martin Luna uxmoon

🏠
Working from home
  • Buenos Aires, Argentina
View GitHub Profile
// --------------------------------------------------------------------------------------
// A More Modern Scale for Web Typography
// Based on this article: http://typecast.com/blog/a-more-modern-scale-for-web-typography
// --------------------------------------------------------------------------------------
$body-font-size: 1em !default;
// Adjusts body typography to be default
// for each browser.
@mixin reset-body-font-size($font-size: 100%, $size-adjustment: 0.5) {
// Source Article: http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/
@mixin vertical-align {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
@uxmoon
uxmoon / boilerplate.html
Last active August 29, 2015 14:16 — forked from hatefulcrawdad/boilerplate.html
HTML Boilerplate for IE8
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/normalize.css">
@uxmoon
uxmoon / ie8-grid-foundation-4.css
Last active August 29, 2015 14:16 — forked from hatefulcrawdad/ie8-grid-foundation-4.css
Foundation Grid for IE8
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
@uxmoon
uxmoon / app.scss
Created March 18, 2015 19:50
handy sass mixins
// Usage
.button {
@include border-radius(5px);
}
.submit-button {
@include border-top-radius(10px);
@include border-right-radius(8px);
@include border-bottom-radius(10px);
@include border-left-radius (6px);
@uxmoon
uxmoon / wp-featured-image-as-bg.php
Created May 20, 2015 15:28
Wordpress - Featured image as background
@uxmoon
uxmoon / search-by-post-id.php
Created October 1, 2015 01:25
WordPress Search by Post ID in the Front-End
<?php
// Requires 'Search by ID' WordPress Plugin
?>
<form action="" method="get">
<input type="text" name="p">
<input type="submit" value="Search">
</form>
@uxmoon
uxmoon / .editorconfig
Created October 5, 2015 13:33
Base files for each project with Foundation and Grunt
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@uxmoon
uxmoon / youtube-poster-frame.css
Created October 26, 2015 13:45 — forked from zigotica/youtube-poster-frame.css
Very simple method to add custom poster frame to youtube video without using youtube API. This code is also valid in browsers not supporting window.postMessage (API uses postMessage). The trick is adding the iframe in a comment. Javascript reads comment contents and saves iframe definition to a var. When JQuery (for the sake of brevity, not real…
.video { position: relative; padding-bottom: 56.25%; /* 16:9 */ height: 0; }
.video img { position: absolute; display: block; top: 0; left: 0; width: 100%; height: 100%; z-index: 20; cursor: pointer; }
.video:after { content: ""; position: absolute; display: block;
background: url(play-button.png) no-repeat 0 0;
top: 45%; left: 45%; width: 46px; height: 36px; z-index: 30; cursor: pointer; }
.video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/* image poster clicked, player class added using js */
.video.player img { display: none; }
.video.player:after { display: none; }
@uxmoon
uxmoon / Default (Windows).sublime-keymap
Last active June 7, 2016 14:59
Sublime Text 3 - Custom Key Bindings for Tabs and Scroll by 1 line
[
// cycle throught tabs
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
// scroll up/down
{ "keys": ["ctrl+up"], "command": "scroll_lines", "args": {"amount": 1.0} },
{ "keys": ["ctrl+down"], "command": "scroll_lines", "args": {"amount": -1.0} }
]