Skip to content

Instantly share code, notes, and snippets.

@darinronne
darinronne / _foundation-outline-buttons.scss
Last active September 30, 2015 16:55
Zurb Foundation 5 SASS Outline Button Styles
/**
* Create Buttons with colored border and text and transparent background
*
* Hover state is solid background color that matches border
* The white hover text is set by Foundation with "button-style" mixin that sets it based on the background color
- found in _buttons.scss
* You could override the hover/focus text color below if it isn't satisfactory
*
* Place in your _global.scss partial
*/
@darinronne
darinronne / rem_calc.sublime-snippet
Last active October 8, 2015 00:25
Sublime Text Snippet: rem-calc
<snippet>
<content><![CDATA[
rem-calc(${1});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>rc</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.scss</scope>
</snippet>
@darinronne
darinronne / foundation5_breakpoint_media_query.sublime-snippet
Last active November 28, 2016 21:03
Sublime Text Snippet: Zurb Foundation 5 CSS Media Query
<snippet>
<content><![CDATA[
@media #{\$${1:medium-up}} {
$2
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>f5bp</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.scss</scope>
@darinronne
darinronne / css_section_title.sublime-snippet
Last active October 8, 2015 00:27
Sublime Text Snippet: CSS Section Title
<snippet>
<content><![CDATA[
/*------------------------------------*\
#$0
\*------------------------------------*/
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>/#</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
@darinronne
darinronne / gist:ef2b679fc8dd0feb9f0f
Created October 7, 2015 23:52
List of US States with Full Name and Abbreviated Value in a Select List
<select name="state">
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District of Columbia</option>
@darinronne
darinronne / gist:ccebbd2990e4b5b63e53
Created October 7, 2015 23:54
List of US States with Full Name and Full Value in a Select List
<select name="state">
<option value="Alabama">Alabama</option>
<option value="Alaska">Alaska</option>
<option value="Arizona">Arizona</option>
<option value="Arkansas">Arkansas</option>
<option value="California">California</option>
<option value="Colorado">Colorado</option>
<option value="Connecticut">Connecticut</option>
<option value="Delaware">Delaware</option>
<option value="District of Columbia">District of Columbia</option>
@darinronne
darinronne / gist:b758428e3ad2a9e0c711
Created October 7, 2015 23:55
List of US States with Abbreviated Name and Full Value in a Select List
<select name="state">
<option value="Alabama">AL</option>
<option value="Alaska">AK</option>
<option value="Arizona">AZ</option>
<option value="Arkansas">AR</option>
<option value="California">CA</option>
<option value="Colorado">CO</option>
<option value="Connecticut">CT</option>
<option value="Delaware">DE</option>
<option value="District of Columbia">DC</option>
@darinronne
darinronne / gist:4cc2a299d8fd5de26848
Created October 7, 2015 23:55
List of US States with Abbreviated Name and Abbreviated Value in a Select List
<select name="state">
<option value="AL">AL</option>
<option value="AK">AK</option>
<option value="AZ">AZ</option>
<option value="AR">AR</option>
<option value="CA">CA</option>
<option value="CO">CO</option>
<option value="CT">CT</option>
<option value="DE">DE</option>
<option value="DC">DC</option>
@darinronne
darinronne / scss_hover_focus.sublime-snippet
Created July 14, 2016 15:04
Sublime Text Snippet: SCSS Hover, Focus
<snippet>
<content><![CDATA[
&:hover,
&:focus {
$1
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>hover</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@darinronne
darinronne / functions.php
Last active October 24, 2016 22:12
Gravity Forms - Add "autocomplete='new-password'" to password inputs
// Add "autocomplete='new-password'" to password input so that password managers don't try to autofill it.
add_filter( 'gform_field_content', function ( $field_content, $field ) {
if ( $field->type == 'password' ) {
return str_replace( 'type=', "autocomplete='new-password' type=", $field_content );
}
return $field_content;
}, 10, 2 );