Skip to content

Instantly share code, notes, and snippets.

View rosemarydotworld's full-sized avatar
🐌
buffering

Rosemary Campbell rosemarydotworld

🐌
buffering
View GitHub Profile
// Get the selector for a version of IE
@function getSelector($version) {
@if $version == 9 {
@return 'html.ie9 &';
} @else if $version > 9 {
@return 'html[data-browser="ie#{$version}"]';
}
}
// Write selectors for given space-separated IE versions
@rosemarydotworld
rosemarydotworld / main.js
Created January 4, 2017 04:05
Namespacing Models in Choo
const choo = require('choo');
const app = choo();
app.model(require('./model-things'));
app.model(require('./model-stuff'));
const view = (state, prev, send) => html`
<main>
<button onclick=${e => send('things:notGood')}>things aren't good</button>
const focusVisible = (props, styles) => `
${props.theme.inputModality === 'KEYBOARD' && `
&:focus { ${styles} }
`}
&:focus-visible {
${styles}
}
`