Mobile Era 2017
@renettarenula
Aysha Anggraini
@renettarenula
aysha.me
codepen.io/rrenula
Designer
Engineer
Designer
Engineer
Designer
Engineer
Time loss
Problems Found!
Designer
Engineer
Designer
Engineer
Designer
Engineer
Designer
Engineer
Problems Found!
Designer
Engineer
Episode
Clips
Trailers
Episode
Clips
Trailers
Episode
Clips
Trailers
Episode
Clips
Trailers
Design
Mocks
Develop &
Test
Beta Testers
Bug fixes, etc.
Rollout!
Time loss
No time for feature request
Low-fidelity mockups
Designer
Engineer
Low-fidelity mockups
Feedback
Designer
Engineer
Prototype!
Low-fidelity mockups
High-fidelity mockups
Feedback
Designer
Engineer
Design
Mocks
Develop &
Test
Beta Testers
Bug fixes, etc.
Rollout!
Prototype!
Less time loss
Feature Request
// nested media queries
.modal-submit-channel {
width: 580px;
@media #{$respond-media} {
width: 780px;
}
}
// un-nested media queries
.slides-vertical {
position: relative;
.slides-wrapper {
height: 298px;
overflow: hidden;
}
}
@media #{$respond-wide} {
.slides-vertical {
.slides-wrapper {
height: 386px;
}
}
}
// mobile first CSS
.modal-submit-channel {
width: 580px;
@media #{$group-large} {
width: 780px;
}
}
// non-mobile first CSS
@media #{$group-small} {
.pagination {
width: 100%;
li.prev,
li.next {
width: 100%;
}
li.pages {
width: 80%;
}
}
}
https://github.com/scottjehl/Device-Bugs
https://github.com/brigade/scss-lint
https://github.com/trulia/hologram
<div class="row">
<div class="col s12">
<div class="header"></div>
</div>
</div>
<div class="row">
<div class="col s12 l8">
<div class="about"></div>
</div>
<div class="col s12 l4">
<div class="episodes"></div>
</div>
</div>
<!-- HTML -->
<div class="wrapper">
<div class="header"></div>
<div class="about"></div>
<div class="episodes"></div>
</div>
.wrapper {
grid-template-columns: repeat(2, 1fr);
grid-gap: 20px;
display: grid;
}
.header {
grid-column: 1fr;
}
1
2
3
1
2
3
// fallback code for older browsers
@supports (display: grid) {
// code for newer browsers
// including overrides of the code above
}
https://hacks.mozilla.org/2016/08/using-feature-queries-in-css/
https://gridbyexample.com/
Build UI Components
Deploy to Staging
QA Test
Trivial Bugs!
Build UI Components
Connect to device
Repeat
Staging & QA Test
Reference: http://stackoverflow.com/questions/11005540/localhost-running-on-mac-can-i-view-it-on-my-android-phone
Trivial Bugs!
GIF Credit: Addy Osmani
Start Render
2.8s
Desktop
Start Render
13.8s
Mobile
Performance on both desktop and mobile before improvements are made
Fully Loaded
23.4s
Fully Loaded
48.2s
Content Sizes
5881KB
Content Sizes
6229KB
Define Fallback & Web Fonts in CSS (@font-face)
Load fonts dynamically & use it
Leverage browser cache to prevent FOUT
https://www.bramstein.com/writing/web-font-loading-patterns.html
https://www.zachleat.com/web/comprehensive-webfonts/
https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display
Async — Scripts with no dependencies
Defer — Scripts with dependencies; Execution order matters
Start Render
13.8s
Start Render
4.9s
64% Faster
Speed improvement on mobile devices
// CSS
.responsive-img {
max-width: 100%;
height: auto;
width: 100%;
}
<!-- HTML -->
<img src="image.png" class="responsive-img" />
<img srcset="image-480.jpg 480w,
image-640.jpg 640w,
sizes="(max-width: 400px) 100vw,
(max-width: 960px) 75vw,
640px"
src="image-640.jpg" alt="Image">
https://jakearchibald.com/2015/anatomy-of-responsive-images/
https://github.com/aFarkas/lazysizes
Content Sizes
6229KB
Content Sizes
2181KB
65% Lower
Content Request on mobile devices
Fully loaded
48.2s
Fully loaded
28.9s
40% Faster
Speed improvement on mobile devices
https://images.guide/
Network level optimizations
PWAs
...many more
@renettarenula
aysha.me
codepen.io/rrenula
http://slides.com/renaysha/responsive-web-bloopers-at-viki/