Skip to content

Instantly share code, notes, and snippets.

Avatar

Matt matt-diehl

  • Google
  • Jersey City
View GitHub Profile
@matt-diehl
matt-diehl / zindex.js
Created Jun 1, 2017
Find all elements on a page with a specified z-index and log them to the console, sorted high to low
View zindex.js
'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 {
@matt-diehl
matt-diehl / .editorconfig
Last active Dec 2, 2015
An editorconfig that tech and front-end people can all agree on
View .editorconfig
# top-most EditorConfig file
root = true
[*]
# We recommend you to keep these unchanged
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
View contact_form.js
var ContactForm = (function () {
var s;
return {
settings: {
inputs: $("#contact_form input"),
submitBtn: $(".js-contact_form-submit")
},
init: function() {
@matt-diehl
matt-diehl / _contact_form.scss
Last active Apr 21, 2017
An example of a module written in Sass.
View _contact_form.scss
/* ===== Contact Form Styles ===== */
// Base styles
.contact_form {
background: #FFF;
border: 4px solid #999;
padding: 10px;
}
.contact_form-label {
color: #000;