Skip to content

Instantly share code, notes, and snippets.

View roytomeij's full-sized avatar

Roy Tomeij roytomeij

  • RoyTomeij.com
  • Amsterdam, The Netherlands
View GitHub Profile
@roytomeij
roytomeij / supports.sass
Created January 28, 2013 15:52
Sass nested @supports test
parent
background: orange
@supports ((perspective: 10px) or (-moz-perspective: 10px))
child
background: blue
$buttons: (
(sales, $color-button-sales-border, $color-button-sales-top, $color-button-sales-bottom),
(personal, $color-button-personal-border, $color-button-personal-top, $color-button-personal-bottom)
);
@each $button in $buttons {
.#{nth($button, 1)} {
background-color: nth($button, 2);
@include background-image(linear-gradient(nth($button, 3), nth($button, 4)));
}
@mixin hide-text {
text-indent: -9999px;
overflow: hidden;
}
.foo {
@include hide-text;
}
.bar {
.foo {
text-indent: -9999px;
overflow: hidden;
}
.bar {
text-indent: -9999px;
overflow: hidden;
}
%hide-text {
text-indent: -9999px;
overflow: hidden;
}
.foo {
@extend %hide-text;
}
.bar {
.foo, .bar, .baz {
text-indent: -9999px;
overflow: hidden;
}
@mixin border-radius($radius) {
border-radius: $radius;
}
.foo {
@include border-radius(5px);
}
.bar {
@include border-radius(7px);
@roytomeij
roytomeij / global_variables.scss
Last active December 25, 2015 15:49
Gist with all parts for "Sass CSS3 animation trajectory ascii art".
$grid-width: str-length(nth($grid, 1));
$column-width: 100% / $grid-width;
$row-height: 100% / length($grid);
@roytomeij
roytomeij / SassForms.md
Created January 30, 2014 14:36
Sass Forms

Sass Forms

Styling forms is hard. Wouldn't it be great if there was a Sass extension that would do just that, configurable to fit your needs? Here's a concept for Sass Forms (which needs a fancier name, obviously). Sass Forms comes with sensible defaults.

Based on existing markup

Because we only want to fight over Sass and the resulting CSS, we'll start with markup from SimpleForm, a gem wildly used in Rails projects (but you could just hand-code said markup as well). By doing this, Sass Forms will immediately work in thousands of web apps. By making the input wrappers, etc configurable, like SimpleForm does, it can be used in even more projects.

Later on, Sass Forms can also support Formtastic markup (or any other gem with predefined output). By tweaking just a few configuration variables, it's also great for forms with custom markup.

@roytomeij
roytomeij / stroopwafelme_press_release.md
Last active August 29, 2015 13:57
Stroopwafel.me Press Release

FOR IMMEDIATE RELEASE

Amsterdam, April 1st, 2014 — Today Stroopwafel.me launches its cloudless service. The Dutch company is about to redefine SaaS: Stroopwafels as a Service. Cookie-lovers worldwide can order batches of Stroopwafels to be delivered to their doorstep monthly. Stroopwafel.me's mission is to make stroopwafels available to everyone.

A stroopwafel (pronounced as stroop-waffle) consists of two thin layers of baked dough with a caramel-like syrup in the middle. It was first made in the Dutch city of Gouda, where leftover bread-crumbs were sweetened with syrup. Although widely available in the Netherlands, they are hard to come by in other parts of the world. Until now.

Stroopwafel.me offers three batch sizes: 25 ($39), 50 ($74) or 100 ($139) stroopwafels. Prices include handling and worldwide shipping. The cookies are individually wrapped to make sure they stay fresh.

The delicious treats are a great snack to grab during a morning coffee break, or for an afternoon sugar rush. They are enjoy