Skip to content

Instantly share code, notes, and snippets.

View lrobeson's full-sized avatar

Laura Robeson lrobeson

View GitHub Profile
@lrobeson
lrobeson / _functions.scss
Created October 3, 2013 21:50
Sass partial - custom functions
/**
* @file
* Custom Sass functions
*
* Define the custom functions for your project here.
* http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#function_directives
*/
// Convert pixel values to em
@function em($px, $base: $base-font-size) {
@lrobeson
lrobeson / _lists.scss
Created October 3, 2013 21:58
Sass partial - list mixins
/**
* @file
* List mixins.
*/
@mixin no-bullet {
list-style-image: none;
list-style-type: none;
}
@lrobeson
lrobeson / _variables.scss
Created October 3, 2013 22:04
Sass partial - variables
/**
* @file
* Custom Sass variables
*
* Define the custom variables for your project here.
* http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#variables_
*
* Media queries use: github.com/Team-Sass/breakpoint/wiki/No-Query-Fallbacks
* Grid via: singularity.gs
*/
@lrobeson
lrobeson / _buttons.scss
Created October 3, 2013 22:07
Sass partial - component: buttons
/**
* @file
* Button styles
*/
%button {
@include adjust-font-size-to($font-size-md);
background-color: $light-blue;
@include border-radius();
@include box-shadow();
@lrobeson
lrobeson / _social-media.scss
Created October 3, 2013 22:10
Sass partial - component: social media buttons
/**
* @file
* Social media buttons
*
* Social media buttons using images from IcoMoon (http://icomoon.io).
*/
%social-button {
@extend %button;
background-position: 0.5em 1em;
@lrobeson
lrobeson / _misc.scss
Created October 3, 2013 22:17
Sass partial - misc. design elements (can't think of a good component name)
/**
* @file
* Misc. design elements
*/
/* background image at the top and bottom of an element */
%texture-lines-top-bottom {
background-image: url(../images/texture-top.png), url(../images/texture-bottom.png);
background-position: top center, bottom center;
background-origin: border-box, border-box;
@lrobeson
lrobeson / _solr-facets.scss
Created October 3, 2013 22:22
Sass partial - component: Solr facets
/**
* @file
* Solr styles for facets within Panels panes
*/
/* attribute selector for facet panes with dynamic class names */
div[class*="pane--facetapi-"] {
.pane__title {
border-bottom: 1px solid $secondary-text-color;
color: $primary-text-color;
@lrobeson
lrobeson / Vagrantfile
Created November 1, 2013 00:02
Vagrant mod for MacBook Pro i5 so the machine doesn't become totally unusable when VM is running
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
vb.customize ["modifyvm", :id, "--cpuexecutioncap", "65"]
@lrobeson
lrobeson / .bash_profile
Created November 13, 2013 19:36
Git branch bash autocomplete with aliases (optional). Add to .bash_profile.
# To Setup:
# 1) Save the .git-completion.bash file found here:
# https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
# 2) Add the following lines to your .bash_profile, be sure to reload (for example: source ~/.bash_profile) for the changes to take effect:
# Git branch bash completion
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
# Add git completion to aliases
@lrobeson
lrobeson / equalHeight.js
Last active March 16, 2016 20:01
Set all instances of a given element to the same (tallest) height.
// Find the tallest instance of a given element within a particular container
// and set all of those elements to that height
function equalHeight() {
$('.CONTAINER-NAME-HERE').each(function(){
var height = 0;
$(this).find('.ELEMENT-NAME-HERE').removeAttr("style").each(function(){
colheight = $(this).height();
if (colheight > height) {
height = colheight;