Skip to content

Instantly share code, notes, and snippets.

@mazell
mazell / gist:8819267
Created February 5, 2014 08:25
CSS: Zgrid
/* Box-Sizing*/
*,
*:after,
*:before {
margin: 0;
padding: 0;
/* Removes padding behaviour on widths */
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
@mazell
mazell / gist:8819396
Last active August 29, 2015 13:56
HTML: Skeleton
<!DOCTYPE HTML>
<html>
<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="inc/css/style.css">
</head>
function post(url, data, callback){
var ajaxRequest = new XMLHttpRequest();
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4 || ajaxRequest.readyState == 200){
callback(ajaxRequest.responseText);
}
}
ajaxRequest.open("POST", url);
ajaxRequest.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
@mazell
mazell / loadJson.js
Created February 6, 2014 13:18
JS: LoadJson
function loadJSON(callback) {
var xobj = new XMLHttpRequest();
xobj.overrideMimeType("application/json");
xobj.open('GET', 'file.json', true);
xobj.onreadystatechange = function () {
if (xobj.readyState == 4 && xobj.status == "200") {
// .open will NOT return a value but simply returns undefined in async mode so use a callback
callback(xobj.responseText);
@mazell
mazell / HorizontalMenu.css
Created February 7, 2014 14:49
CSS: Horizontal Menu
#navmenu ul {margin: 0; padding: 0;
list-style-type: none; list-style-image: none; }
#navmenu li {display: inline; }
#navmenu a {text-decoration:none; color: #fff; }
#navmenu a:hover {color: #333; }
@mazell
mazell / floatingbox.scss
Created February 9, 2014 18:23
SCSS: Floating boxes
.frame{background:#ff3;overflow:hidden;width:100%;}
.box{
//width:90%;
width:160px;
padding-bottom: 160px;
position: relative;
float:left;
margin:8px;
.innerContent{
position: absolute;
@mazell
mazell / compass.html
Created February 11, 2014 19:05
HTML: Compass Styles
<head>
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
<link href="/stylesheets/print.css" media="print" rel="stylesheet" type="text/css" />
<!--[if IE]>
<link href="/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
<![endif]-->
</head>
@mazell
mazell / inputbase.scss
Created February 14, 2014 14:38
CSS: Basic Input
.page-template-page-contact-form-php{
input[type=text]{
width: 20%;
border: 1px solid #C0C0C0;
border-radius:10px;
line-height: 1.5em;
padding: 10px;
background: rgba(255,255,255,0.5);
@mazell
mazell / Angular.html
Created February 21, 2014 12:25
HTML: Angular Boilerplate
<!DOCTYPE html>
<!-- define angular app -->
<html ng-app="zelloutApp">
<head>
<!-- SCROLLS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" />
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.0.0/css/font-awesome.css" />
@mazell
mazell / wp-header.php
Created March 3, 2014 10:01
WP: Header template
<!DOCTYPE HTML>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title><?php wp_title( '|', true, 'right' ); ?></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<link rel="stylesheet" href="inc/css/normalize.css">