Skip to content

Instantly share code, notes, and snippets.

View matt-diehl's full-sized avatar

Matt matt-diehl

  • Google
  • Falling Waters, WV
View GitHub Profile
@matt-diehl
matt-diehl / _contact_form.scss
Last active April 21, 2017 21:18
An example of a module written in Sass.
/* ===== Contact Form Styles ===== */
// Base styles
.contact_form {
background: #FFF;
border: 4px solid #999;
padding: 10px;
}
.contact_form-label {
color: #000;
var ContactForm = (function () {
var s;
return {
settings: {
inputs: $("#contact_form input"),
submitBtn: $(".js-contact_form-submit")
},
init: function() {
@matt-diehl
matt-diehl / .editorconfig
Last active December 2, 2015 21:43
An editorconfig that tech and front-end people can all agree on
# top-most EditorConfig file
root = true
[*]
# We recommend you to keep these unchanged
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@matt-diehl
matt-diehl / zindex.js
Created June 1, 2017 16:19
Find all elements on a page with a specified z-index and log them to the console, sorted high to low
'use strict';
(function() {
var allElements = document.querySelectorAll('*');
var zIndexElements = [].map.call(allElements, function(el) {
var style = window.getComputedStyle(el, null);
var zIndex = style.getPropertyValue('z-index');
return {