Skip to content

Instantly share code, notes, and snippets.

View chrisfromredfin's full-sized avatar

Chris Wells chrisfromredfin

View GitHub Profile
<?php
/**
* Implementation of hook_drush_command().
*
* In this hook, you specify which commands your
* drush module makes available, what it does and
* description.
*
* Notice how this structure closely resembles how
* you define menu hooks.
{
"Use Non-ASCII Font" : true,
"Tags" : [
],
"Ansi 12 Color" : {
"Blue Component" : "0.8117647",
"Green Component" : "0.6235294",
"Red Component" : "0.4470588"
},
@chrisfromredfin
chrisfromredfin / gist:39374262fda0b276bf9ccf38c00504d4
Created February 5, 2017 18:46
CSS for Santizing Drupal's $tabs
ul.primary { border-bottom: 0; white-space: normal; line-height: 1.6em; padding: 0; margin: 0 }
ul.primary li a { border-style: solid; white-space: nowrap; margin-right: .1em; }
ul.primary li.active a { border-bottom: 1px solid #bbb; }
ul.primary li a:hover { border-bottom-color: #ccc; }
@chrisfromredfin
chrisfromredfin / gist:23973ea8fb9d101c04d43f181b849deb
Created February 5, 2017 18:50
SASS for Sanitizing Drupal's $tabs
ul.tabs {
border-bottom: 0;
white-space: normal;
line-height: 1.6em;
padding: 0;
margin: 0;
li {
a {
border-style: solid;
@chrisfromredfin
chrisfromredfin / gist:1bf115f4ec6d4b69e67654a091052dfa
Created March 20, 2017 14:50
AppleScript - Safari close tabs to the right
tell window 1 of application "Safari"
close (tabs where index > (get index of current tab))
end
diff --git a/css/color_field_widget_box.css b/css/color_field_widget_box.css
index d224c0d..1ef10c2 100644
--- a/css/color_field_widget_box.css
+++ b/css/color_field_widget_box.css
@@ -8,6 +8,7 @@
font-size: 1.2em;
margin: 0 3px;
padding: 1px 8px;
+ box-shadow: 0 0 1px #000;
}
/// Components: small, re-useable components used on the site.
/// @group components
/// @name Button
/// @group Components
/// @example markup
/// <a href="#" class="button">Click me</a>
%button {
border-radius: 5px;
background-color: green;
@mixin embed-container($width, $height) {
$ratio: ($height / $width) * 100%;
position: relative;
padding-bottom: $ratio;
height: 0;
overflow: hidden;
max-width: 100%;
iframe, object, embed {
/// Mixins: custom re-useable but configurable tools we use.
/// @group Mixins
/// Helper mixin to drop on the wrapper for an iframe
/// that you would like to be responsive.
///
/// @group Mixins
/// @author Smashing Magazine
///
/// @param {Length} $width - Element's width
/// @example scss -
/// @import “style.scss”
/// .embed-container {
/// @include embed-container(400px, 300px);
/// }