smashing conf 2017 πͺπΈ
π₯ βοΈ β΅οΈ π·
Brad Frost
Design systems + How we work + Design tokens
Design System
Basically, make a design system and it will promote:
- UI consistency and cohesion
- Faster time to production
- Shared vocabulary
- Easier testing
- Useful referencing
- Future-friendly foundation
Brads top tips
- (Dev) To avoid task ambiguity - make everyone do a codepen in planning.
- (Design) Use Sketch libraries let you share symbols accross documents
- Use design tokens...
Design Token Properties
- Background colours
- Border thinkness
- Font sizes
etc
Design tokens in CSS
// design-tokens.css
:root {
--primary-heading: 24px;
}
@import "design-tokens.css";
h1 {
font-size: var(--primary-heading);
}
Design system + Design tokens
Sarah Drasner
Cheating UX
Firstly: Why are mirrors in lifts?
Amazon
"For every one second delay, conversions dropped by 7%. If you sell $100k per day, thatβs an annual loss of $2.5m."
Wallmart
"Gains 1% revenue increase for every 100ms of improvement. π΅"
Ericsson
Anything loading over 4 seconds: horror.
Why do we animate?
The attention span of a user is only 2 seconds...
Humans over-estimate passive waits by 36%
Novel waiting experiences
make
people
wait
longer
Don't use a loading spinner
Use a branded loading animation
Lots of short animations are perceived as long
... but one long animation becomes shorter.
Younger audiences are more demanding
π
and will not wait as long as
π΄π»
Trust your APIs
Provide optimimistic, instant feeback to the user (where appropriate π)
Ideal Interface Response Guide
DURATION β± |
ACTION π |
0 - 300ms |
Provide Instant UI feedback |
300ms - 1 second |
Delay is tolerable - do nothing |
2 - 5 seconds |
Display loading animation |
How can you make something to animate?
- Get an SVG
- Has to have a stroke, dash offset, maybe dasharray
- Animate dash offset with keyframes
.path {
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
animation: dash 5s linear forwards;
}
@keyframes dash {
to {
stroke-dashoffset: 0;
}
}
Tyler Sticka
Don't use icon fonts
Don't use icon fonts
When they fail they expose
the unicode they were mapped to
Which can fail too
ο ο ο
(bad for accessibility)
or display something completely unexpected...
βοΈοΈοΈοΈοΈοΈοΈοΈοΈβοΈβοΈοΈοΈοΈοΈοΈοΈοΈοΈβοΈπ΄
Monica Dinculescu
Fontastic Web Performance
68% of websites use web fonts
How we use font face
When loading web fonts,
they render block.
FOIT vs FOUT
Font Display Strategy
Link rel="preload"
Font face observer
Top tips
- π Don't use / limit web fonts
- π Use .woff2 font files
- π Use a font-display strategy
- π Preload the font
- π¦ Only use the character range you need
- π¦ Use font face observer for more control
Thanks!