Skip to content

Instantly share code, notes, and snippets.

@kylegach
kylegach / Button.stories.mdx
Last active March 23, 2022 15:50
Storybook Canvas Doc Block that respects viewport parameters
@kylegach
kylegach / app.js
Last active January 31, 2019 22:01
Possible method to opt-out of emotion 10's "unreliable selectors" warnings
// app/src/app.js
// This will _not_ throw the 'first-child' warning
const sampleStyles = {
'&:first-child': {
emotionIgnore: 'ssr-warning',
color: 'rebeccapurple'
}
}
@kylegach
kylegach / index.js
Last active April 18, 2019 19:13 — forked from vikramrojo/index.js
CSS in JS using styled-components, polished & styled-system
import React from 'react';
import styled, { ThemeProvider, css } from 'styled-components'
import { darken, lighten } from 'polished'
import { space, width, fontSize, color } from 'styled-system'
import { storiesOf } from '@storybook/react';
// import { action } from '@storybook/addon-actions';
// import { linkTo } from '@storybook/addon-links';
//Theme for Layers
#deviceFrame, hr {
box-sizing: content-box
}
.footnotes, .markdown pre, .markdown table {
font-size: .875rem
}
a:link, abbr[title] {
text-decoration: none
}
#deviceFrame {
@kylegach
kylegach / SassMeister-input.scss
Created June 26, 2015 01:23
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
@mixin cp-context($contexts) {
@each $context in $contexts {
@each $current in $cp-currentContext {
@if $context == $current {
@if $context == 'system' {
.cp-AdminWrap & {
@kylegach
kylegach / keybase.md
Created June 3, 2015 13:17
Keybase proof

Keybase proof

I hereby claim:

  • I am kylegach on github.
  • I am kylegach (https://keybase.io/kylegach) on keybase.
  • I have a public key whose fingerprint is 68C2 1F87 8541 E890 15FB 485F 1114 1634 8283 3B57

To claim this, I am signing this object:

@kylegach
kylegach / MetaViewportQuestion
Last active August 29, 2015 14:02
Quick question about meta viewport
According to http://quirksmode.org/mobile/metaviewport/, iOS Safari has an issue with using 'width=device-width' when in landscape orientation. This fits with our experience: our responsive sites (e.g. http://mo-springfield.civicplus.com & http://wa-snohomishcounty.civicplus.com) are not resizing properly if loaded in portrait then rotated to landscape.
I noticed that http://filamentgroup.com is _not_ subject to the issue, despite using the same meta viewport values we are, so I was hoping you could take a moment to explain how you've managed that.
Additionally, you cannot pinch-to-zoom on our sites, but we, like you, are not using 'user-scalable=no'.
Btw, I was astonished at how quickly you were able to get the FG site loaded. Very nice work!