Skip to content

Instantly share code, notes, and snippets.

@krisbulman
krisbulman / mixins.scss
Created August 9, 2011 19:59
shorthand-border
@mixin shorthand-border($border-width: 1px, $border-color: #ccc, $border-style: solid) {
@if length($border-width) > 1 {
border-width: $border-width;
border-style: $border-style;
border-color: $border-color;
}
@else if length($border-style) > 1 {
border-width: $border-width;
border-style: $border-style;
border-color: $border-color;
@krisbulman
krisbulman / tabs.scss
Created August 15, 2011 22:53
css3 primary tabs for drupal
@import "compass/css3/border-radius";
@import "compass/css3/text-shadow";
@import "compass/css3/transition";
@import "compass/css3/images";
$tabs-color: #dedede;
$page-bg: white;
$tabs-text-color: #333333;
ul.primary {
@krisbulman
krisbulman / map-pei-election-results.xml
Created October 26, 2011 19:35
This is a DBIx-XML-DataLoader-1.1b map file to map the elections pei xml feed to PostgreSQL
<XMLtoDB>
<dbinfo dbuser="postgres" dbpass="password" dbsource="dbi:Pg:dbname=peivotes;host=localhost;port=5432" name="peivotesca"/>
<RootElement name="rss"/>
<DocKeyColumn name="guid"/>
<Table name="Candidates" dbname="peivotes" xpath="./channel/item/electionspei:ballotcount">
<KeyColumn name="GID" order="1"/>
<KeyColumn name="Poll" order="2"/>
<KeyColumn name="Dist_no" order="3"/>
@krisbulman
krisbulman / px-to-em.scss
Created July 31, 2012 14:40
CSS Summit - PX to EM
// Thanks to Chris Eppstein for this gem
$base-line-height: 18px !default;
$base-font-size: 13px !default;
$base-em-ratio: 1em / $base-font-size !default; // used by the px-to-em function below
// Converts px to em in case you do need relative units in your output.
@function px-to-em($value, $em-ratio: $base-em-ratio) {
@return $value * $em-ratio;
}
@krisbulman
krisbulman / A Set of Instructions.markdown
Created September 12, 2012 04:09
Example for font-icons

Here is a quick project setup and usage tutorial:

Compass Project Creation

  1. Install font-icons
sudo gem install font-icons --pre
  1. Create a new bare bones compass project using the compass install instructions
<div id="menu-dropdown">
<ul>
<li><a href="#">Menu Item 1</a></li>
<li><a href="#">Menu Item 2</a></li>
</ul>
</div>
<div class="psuedo-menu"><a class="closed-box" id="menu-link" href="#">Menu</a></div>
@krisbulman
krisbulman / Readme.md
Last active October 12, 2015 00:58
A Sass mixin for block lists.
@krisbulman
krisbulman / README.md
Created October 30, 2012 19:04
columns-break doesn't exist in --pre 13.0.alpha
@krisbulman
krisbulman / ruby-resources.markdown
Last active December 12, 2015 12:29
Ruby Resources
@krisbulman
krisbulman / SassMeister-input.scss
Last active December 13, 2015 19:09
Generated by SassMeister.com, the Sass playground.
// Sass v3.2.5
// Just realized: In Sass “&” can be a standalone referent
// to the parent class. so ".foo, .bar, &" is a valid selector.
// @lonelytype
.foo {
.bar, & {
margin: 0;
}