Skip to content

Instantly share code, notes, and snippets.

View ryanve's full-sized avatar
🟣
🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣

deepskyblue ryanve

🟣
🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣🟣
View GitHub Profile
@ryanve
ryanve / border-between.css
Created June 3, 2017 01:40
border between classes
.border-between-top:not(:first-child) { border-top-style: solid; border-top-width: 1px }
.border-between-bottom:not(:last-child) { border-bottom-style: solid; border-bottom-width: 1px }
.border-between-left:not(:first-child) { border-left-style: solid; border-left-width: 1px }
.border-between-right:not(:last-child) { border-right-style: solid; border-right-width: 1px }
@ryanve
ryanve / factors.md
Created June 2, 2017 19:06
Typography factors

type scale and line-height

  • font-size affects line-height needs
  • translations affect line-height needs
  • responsive accomodations
@ryanve
ryanve / flow.css
Last active May 30, 2017 21:07
vertical flow (vertical rhythm)
.flow-baseline { vertical-align: baseline }
.flow-sub { vertical-align: sub }
.flow-super { vertical-align: super }
.flow-text-top { vertical-align: text-top }
.flow-text-bottom { vertical-align: text-bottom }
.flow-top { vertical-align: top }
.flow-bottom { vertical-align: bottom }
.flow-middle { vertical-align: middle }
.flow-single { line-height: 1 }
@ryanve
ryanve / size.css
Last active May 30, 2017 05:44
responsive type-scale based on fibonacci but rounded for better pixel values
:root {
--size-h0: 2.25rem;
--size-h1: 2rem;
--size-h2: 1.625rem;
--size-h3: 1.375rem;
--size-h4: 1.25rem;
--size-lede: 1.125rem;
--size-text: 1rem;
--size-fine: .875rem;
}
@ryanve
ryanve / line.css
Last active May 31, 2017 01:23
line-height CSS classes
.line-single { line-height: 1 }
.line-compact { line-height: 1.25 }
.line-passing { line-height: 1.5 }
.line-optimal { line-height: 1.75 }
.line-double { line-height: 2 }
.line-inherit { line-height: inherit }
@ryanve
ryanve / pointer.css
Created May 28, 2017 22:44
CSS pointer module
.pointer {
--enabled-cursor: pointer;
--disabled-cursor: not-allowed;
}
.pointer,
.pointer:enabled {
cursor: pointer;
cursor: var(--enabled-cursor);
}
@ryanve
ryanve / dot-lookup.js
Last active May 25, 2017 03:22
JavaScript dot lookup function
function lookup(object, dots) {
return dots.split('.').reduce(function(memo, next) {
return memo[next]
}, object)
}
@ryanve
ryanve / separations.md
Last active May 31, 2017 16:40
CSS separations
  • layout
    • flexbox
    • grid system
    • spacing
    • position
    • border
    • z-index
    • display
    • overflow
  • floats
@ryanve
ryanve / favor.md
Last active May 19, 2017 20:36
design concepts to favor
  • approachability (be simple, expressive)
  • decoupling (create bridges, swim lanes)
  • empowering (inspire confidence)
  • feedback (listen, collaborate, ask why)
  • inclusivity (accessibility, empathy, appropriate tone)
  • impact (exposure to diverse ideas)
  • prototyping (facilitate consumption, deliver standards)
  • resilience (compose isolated modules, enforce with tooling)