Skip to content

Instantly share code, notes, and snippets.

View mirisuzanne's full-sized avatar

Miriam Suzanne mirisuzanne

View GitHub Profile
@mirisuzanne
mirisuzanne / SassMeister-input-HTML.html
Created November 4, 2015 17:02
Generated by SassMeister.com.
<div class="container">
<div class="test">hello</div>
<div class="test2">hello</div>
<div class="test">hello</div>
</div>
@mirisuzanne
mirisuzanne / SassMeister-input-HTML.html
Created January 12, 2014 07:01
Susy One Tutorial: Mobile-First Magic Grids [part 2]
<div class="page">
<header class="banner">
<p>Banner</p>
</header>
<nav class="pagenav">
<p><a href="#">Page Nav</a></p>
</nav>
<main class="main">
<aside class="summary">
<p>Summary</p>
@mirisuzanne
mirisuzanne / SassMeister-input-HTML.html
Created January 26, 2014 04:58
Generated by SassMeister.com.
<div class="container">
<input type="checkbox" id="left" class="toggle-input show-left" />
<input type="checkbox" id="right" class="toggle-input show-right" />
<header>
<label for="left" class="toggle">show-left</label>
<label for="right" class="toggle">show-right</label>
<h1>header</h1>
</header>
<div class="left" id="left">left</div>
<div class="main">main</div>
@mirisuzanne
mirisuzanne / SassMeister-input-HTML.html
Last active January 3, 2016 00:19
Susy One Tutorial: Mobile-First Magic Grids [part 1]
<div class="page">
<header class="banner">
<p>Banner</p>
</header>
<nav class="pagenav">
<p><a href="#">Page Nav</a></p>
</nav>
<main class="main">
<aside class="summary">
<p>Summary</p>
@mirisuzanne
mirisuzanne / SassMeister-input-HTML.html
Last active January 1, 2016 18:50
Generated by SassMeister.com.
<div class="newApp">
<div class="rounded">
<ul>
{{#each tasksToDo}}
{{>task}}
{{/each}}
</ul>
</div>
<div class="rounded2">
@mirisuzanne
mirisuzanne / problem.md
Last active December 27, 2015 23:19
Keywords for different Susy span widths:

Any span in Susy potentially has 1 or 2 attached side gutters. A default Susy span doesn't include any of these, but margins/padding often do include them, and it is sometimes useful to span more gutters than the default. The three options are no-side-gutters (most common), 1-side-gutter (somewhat common), or 2-size-gutters (least common). This is true whether you have the gutters inside (as padding) or outside (as margins):

example

Susy 1, and all the Susy 2 alphas so far have only supported the first 2 options:

Susy 1.x

  • width-1: columns() [function]
  • width-2: space() [function]
@import "breakpoint";
@import "susy";
// The expanded syntax allows you to use any breakpoints along with any possible grid settings.
// Very powerful, but also a bit verbose.
// at-breakpoint(30em 8)
@include breakpoint(30em) {
@include use-grid(8) {
// your 8-column layout with a min-width of 30em
@mirisuzanne
mirisuzanne / map-set.scss
Created October 19, 2013 15:58
When I first heard that Sass 3.3 had no map-merge function, I was confused. Why force me to create a map, and then merge it? That sounds like two steps to accomplish one simple task! But that's not the case. Map-merge is a much more powerful function, and using it to set a key in an existing map is quite straight-forward. In fact, I couldn't com…
// a map!
$map: (
1: hello,
2: world,
);
// a map-set function (not included with Sass)
@function map-set($map, $key, $value) {
$new: ($key: $value);
@return map-merge($map, $new);
// ----------------------------------------------
// I want to define the important layout settings
// $columns: <integer> | <list>;
$columns: 12;
// $gutters: <ratio>;
$gutters: .25;
// $column-width: auto | <length>;
@mirisuzanne
mirisuzanne / tabs.mkd
Last active December 14, 2015 05:08
equal-height tabs

Hide/show tab content

  • keep the container flexible, so it wraps all the tabs.
  • keep the container equal-height across tabs

The container will always wrap the largest tab, with no JS required. I use radio-buttons to toggle, keeping everything in CSS - see ericam/accoutrement for the full tab-toggling code.