Skip to content

Instantly share code, notes, and snippets.

View mturnwall's full-sized avatar

Michael Turnwall mturnwall

View GitHub Profile
@mturnwall
mturnwall / JS Coding Examples.md
Last active November 7, 2018 19:43
Coding questions and examples for javascript

Code Questions

Casting

var x = 078 + 1, // 79
	y = 077 + 1; // ?

Hoisting

@mturnwall
mturnwall / SassMeister-input.scss
Created March 25, 2015 18:41
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
.mpgGraph {
$block: mpgGraph;
overflow: hidden;
margin: 20px auto;
@mturnwall
mturnwall / SassMeister-input.scss
Created August 7, 2015 20:05
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
%btn--default {
border-radius: 2px;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
margin: 0;
}
%btn--primary {
@mturnwall
mturnwall / SassMeister-input.scss
Last active September 2, 2015 17:47
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
/// this overrides the default fonts directory. Set
/// it to the location of your fonts.
$fonts-dir: '/fonts';
$fontsMap: (
"Proxima-Nova": (
@mturnwall
mturnwall / font_face_generator.scss
Last active March 30, 2025 19:49
Sass Font-Face Generator Mixins
// ----
// libsass (v3.2.5)
// ----
////
/// Font-Face Generator (FF)
/// @author Hugo Giraudel, Michael Turnwall
////
/// Path to the location of the font files
@mturnwall
mturnwall / buttons_with_themes.scss
Last active April 9, 2016 01:10
Generated by SassMeister.com.
// ----
// libsass (v3.3.2)
// ----
/// Button themes
$button-themes: (
primary: (
bgColor: blue,
color: white
),
@mturnwall
mturnwall / SassMeister-input.scss
Last active October 28, 2020 07:36
Generated by SassMeister.com.
// ----
// libsass (v3.3.6)
// ----
@mixin heading-2() {
font-size: 1.1rem;
line-height: 1.2;
font-weight: 500;
}
@mixin button($color: #fff, $bg-color: #f00) {
@mturnwall
mturnwall / SassMeister-input.scss
Last active November 10, 2017 20:08
Sass Button Mixin
// ----
// libsass (v3.5.0.beta.2)
// ----
$btn-themes: (
primary: (
bgColor: #ef6c29,
border: #333,
color: #fff,
hover: darken 15%,
@mturnwall
mturnwall / SassMeister-input.scss
Last active October 28, 2020 07:56
Generated by SassMeister.com.
// ----
// libsass (v3.5.0.beta.2)
// ----
$font-size-base: 16px !default;
$font-fallback-type: '' !default;
@function get-relative-font-size($actual, $relative: $font-size-base, $unitType: 'rem') {
@if $unitType == 'rem' {
@return #{($actual / $font-size-base)}rem;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">