Skip to content

Instantly share code, notes, and snippets.

View babsgosgens's full-sized avatar
🤡
Life’s a parade

Babs Gösgens babsgosgens

🤡
Life’s a parade
  • Rosmalen, Netherlands
View GitHub Profile
@babsgosgens
babsgosgens / list.php
Created August 3, 2012 07:04 — forked from AmyStephen/list.php
To create a .gitignore with a list of all files in Repository
<?php
/**
* @package Molajo
* @copyright 2012 Amy Stephen. All rights reserved.
* @license GNU GPL v 2, or later and MIT, see License folder
*
* Place in the root of your website - execute it - and copy the results into your .gitignore
*/
$current_path = __DIR__;
@babsgosgens
babsgosgens / calc-elem.scss
Created September 3, 2012 13:09 — forked from moyarich/calc-elem.scss
using SASS to convert/calculate css sizes from px to em, px to percent and em to px; also has function to remove units / (Design in pixels then convert it to em or percent)
//----- Global variables-------------
$mr-grid-width: 1200px !default; // The wrapper/container size$mr-gutter-width: 20px !default; // The amount of margin between columns
$mr-em-base: 16px !default;
$mr-convert-to: "%" !default;
//----------------------------------
@function -mr-grid-col-width($cols, $grid-width:$mr-grid-width, $grid-total-cols:$mr-grid-total-column, $gutter-width: $mr-gutter-width){
//$cols The number of columns used to create the current elements width.
@return ($grid-width / $grid-total-cols) * $cols - $gutter-width;
@babsgosgens
babsgosgens / persistant-grid-gist
Created October 18, 2012 18:15
The Persistant Grid
/* Padding stuff */
.col {
@include box-sizing('border-box');
padding-left: $columnPadding / 2;
padding-right: $columnPadding / 2;
&[class*="collection"],
&.parent {
padding-left: 0;
padding-right: 0;
/* Experimental */
@babsgosgens
babsgosgens / TPG-3ColumnLayout
Created October 19, 2012 14:26
The Persistant Grid: three-column layout
<div class="full parent col">
<div class="third col">&nbsp;</div>
<div class="third col">&nbsp;</div>
<div class="third col">&nbsp;</div>
</div>
@babsgosgens
babsgosgens / TPG-9ColumnLayout
Created October 19, 2012 14:28
The Persistant Grid: nine-column layout
<div class="full parent col">
<div class="third parent col">
<div class="third col">&nbsp;</div>
<div class="third col">&nbsp;</div>
<div class="third col">&nbsp;</div>
</div>
<div class="third parent col">
<div class="third col">&nbsp;</div>
<div class="third col">&nbsp;</div>
<div class="third col">&nbsp;</div>
@babsgosgens
babsgosgens / TPG-2ColumnLayout
Created October 19, 2012 14:30
The Persistant Grid: two-column layout with a persistent three column right column
<div class="full parent col">
<div class="half col">&nbsp;</div>
<div class="half parent col">
<div class="persistent third col">&nbsp;</div>
<div class="persistent third col">&nbsp;</div>
<div class="persistent third col">&nbsp;</div>
</div>
</div>
@babsgosgens
babsgosgens / calc-elem.scss
Created November 13, 2012 20:58 — forked from moyarich/calc-elem.scss
using SASS to convert/calculate css sizes from px to em, px to percent and em to px; also has function to remove units / (Design in pixels then convert it to em or percent)
//----- Global variables-------------
$mr-grid-width: 1200px !default; // The wrapper/container size$mr-gutter-width: 20px !default; // The amount of margin between columns
$mr-em-base: 16px !default;
$mr-convert-to: "%" !default;
//----------------------------------
@function -mr-grid-col-width($cols, $grid-width:$mr-grid-width, $grid-total-cols:$mr-grid-total-column, $gutter-width: $mr-gutter-width){
//$cols The number of columns used to create the current elements width.
@return ($grid-width / $grid-total-cols) * $cols - $gutter-width;
@babsgosgens
babsgosgens / jquery.formfilter.js
Created November 29, 2012 11:10
For filtering datasets and populating form elements. Currently only populates select elements.
/*
* Form Filter - jQuery plugin for filtering datasets
*
* Copyright (c) Babs Gösgens
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Version: 1.0
*
@babsgosgens
babsgosgens / settings-grid
Last active December 20, 2015 15:28
Persistent Grid Framework Persistent Grid - Settings
// Set in case this module is used outside PG Framework
$base-line-height: 24px !default;
// Set in case this module is used outside PG Framework
$reset-box-model: true !default;
// Set a max width on a root container of your choice, the content will not stretch beyond this width.
// The root container can be positioned left or center, for alternate position you can provide your own behavior.
$root-selector: ".root";
$root-max-width: 1152px;
@mixin column-behavior($apply-border-box: $apply-border-box, $column-float: $column-float)
{
@if $column-float {
display: block;
float: left;
}
@else {
@include inline-block(top);
@if $negative-right-margin {
margin-right: $negative-right-margin !important;