Skip to content

Instantly share code, notes, and snippets.

View morewry's full-sized avatar
💭
⛈ 🌩 ☁️ 🌧 ☁️ ⛈ 🌧 🌩 ☁️

Rhy Moore morewry

💭
⛈ 🌩 ☁️ 🌧 ☁️ ⛈ 🌧 🌩 ☁️
View GitHub Profile
@cvrebert
cvrebert / css_regression_testing.md
Last active March 30, 2025 19:49
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
http://plnkr.co/edit/G6wObW2hXYvqlGcGJoEU?p=preview
http://plnkr.co/edit/uZ4qQDJIH2htNXLswsqY?p=preview
http://plnkr.co/edit/GrKmTFPfzkFvVWi1vkKJ?p=preview
http://plnkr.co/edit/Z7wrznN1l7i469cYEOke?p=preview
http://plnkr.co/edit/mONgKU4XRqZlJ5RPKDQL?p=preview
http://plnkr.co/edit/11BbgDmxH2nDntgYLO1V?p=preview
@rodneyrehm
rodneyrehm / gist:40e7946c0cff68a31cea
Last active March 12, 2025 19:23
Diagrams for Documentation

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

@hdragomir
hdragomir / sm-annotated.html
Last active February 2, 2025 02:22
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@ezekg
ezekg / SassMeister-input.scss
Created June 7, 2014 19:18
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// Flint (v1.3.5)
// ----
@import "flint";
// Customization module defaults
// -------------------------------------------------------------------------------
@morewry
morewry / _convert-units.scss
Created May 26, 2014 22:18
Sass convert length units
/*
# Convert Units (function)
TODO: Description
*/
// ---------------------------------------
@function convert-units ( $length, $as: rem, $root: 16, $ppi: 96 ) {
$unit: unit($length);
@pascalduez
pascalduez / SassMeister-input.scss
Created April 30, 2014 19:16
Prototypal inheritance in Sass
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
// Prototypal inheritance in Sass
// Disclaimer: might be totally contrived and useless...
// “It’s not about the destination, but the journey.”
// New operator
@morewry
morewry / sass-extend-or-include-wish
Created April 3, 2014 03:23
Something I wish I could do in Sass
// ---------------------------------------
/*
## Set / Get
http://cdpn.io/hgLal
*/
// ---------------------------------------
@morewry
morewry / respond-to.scss
Last active October 1, 2015 21:07
Sass mixin for nicknamed, comma-separated "or" media queries
/*
# Responsive Design Utilties
A few Sass functions and mixins helpful for responsive designs including a function to convert between CSS measurement units and a respond-to media query mixin that supports comma-separated "or" queries.
*/
// ---------------------------------------
// ---------------------------------------
/*
@dglazkov
dglazkov / gist:716913d889c38e42d55c
Last active March 19, 2020 16:14
Composition is the Goal

#Composition is the Goal

I see several discussions now that vacillate around on encapsulation qualities of Shadow DOM and the flavors thereof. It's all my fault. I stuck encapsulation into the problem statement of the spec. I even glued the somewhat irrelevant term functional encapsulation on top of it. What a dork.

It was a couple of years ago, when one of my colleagues read the spec and noted: "Dude, it's like your story and whatever, but the way you tell it, Shadow DOM is not about encapsulation. It's about composition". The world went blank around me. I was blinded by insight.

My hipster colleague was right, of course. Encapsulation is just a tool. Composition is the goal.

This is why the people who'd never used Shadow DOM in real life get really hung up on the details of encapsulation, while those who actually use Shadow DOM stare at them quizzically.