The last session of the conference was what Chris referred to as an “all-day session”. Chris spoke extensively on multiple topics throughout the day, all of which centered around the idea that writing a website today has a lot of complexity.
Truth be told, most of us in the audience know perfectly well how to build a website, at least to the point that we can build something and get it into publication. Some days it seems like everyone and a whole bunch of things (looking at you, frameworks) believe they know how to build a website.
But best practices are harder to identify and codify, especially with the industry moving on so many topics in so many directions at once. The result: this session was a fantastic use of my time, even having been in the industry for over 20 years.
It’s worth nothing that the session was very geared toward front-end development and developers. This was not the session where you were going to learn how to design a website or how to brand or even at the other end how to test. In that sense, it was the most focused session of the conference.
Since it was an all-day session, and since Chris spent a significant amount of that time actively coding, I did my best to capture the highest concepts and did not get every detail. If you’d like ever detail, Chris is teaching another session in Chicago in August.
Today is @chriscoyier's workshop, "Let's Build a Website!" #aeasea pic.twitter.com/QmX2smAKSO
— Anne Gibson (@perpendicularme) April 5, 2017
Arting
+ Nerding
+ Businessing
—————————
Front end design and development #AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
The work is creative! https://t.co/qSdnkQuebJ#AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Examples for today’s work is a gym website #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
(which seemed like something I’d need to tell you when referencing later, but really it wasn’t.)
.@chriscoyier recommends https://t.co/36DdP14Nxa as a great tool for Mac users. Costs $100. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Another app is Figma – which is a website – that gets compared to Sketch a lot. Allows multiple people to real-time design at once #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
UXPin is another web-based design tool. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Invision is a good tool for collaborating designs that were built in other apps #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Adobe Experience Design is Adobe’s competition for Sketch. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
The market is still figuring itself out
Responsive design
Collaboration
Interactivity
Native/Web
Trends#AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
https://twitter.com/perpendicularme/status/849658674377183232\
(Sometimes I feel like the only weirdo doing all her wireframes in Omnigraffle, but I’m fast at it so I’m sticking to it.)
It doesn’t hurt to not be opinionated about these things #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Chris used a good number of these different apps, and different apps for different projects. That’s a great approach because it means you stay fresh with what’s in the market and at the same time don’t get locked in to only way to think about designs and deliverables.
– Design with design software
– Design in the browser
– Sketch on paper
– Design in my brain as I sleep
– All of the above#AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
Waterfall is too clean to be real. It only looks good on paper. If the design isn’t iterating, there’s a problem. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
This is what design actually looks like #aeasea pic.twitter.com/CdaznWDR1G
— Anne Gibson (@perpendicularme) April 5, 2017
(even that looks kind of clean to me.) (Last year was rough.)
The healthiest projects will involve plenty of back-and-forth between designers and developers (if they’re different people) #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Sketch provides a color palette that lists the document colors #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Sketch also provides the ability to use some type styles and symbols as reusable chunks #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Start with HTML, not just because we’re in a workshop, but because the ultimate launch ends in HTML #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Write our best possible semantics and accessible markup in the HTML prototype. A good part of #A11y work happens in HTML #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
https://twitter.com/DenMcH/status/849661702652141572
This is your baseline #AEASEA pic.twitter.com/8gfU2OVkRM
— Anne Gibson (@perpendicularme) April 5, 2017
HTML5 Boilerplate brings in a lot of assumptions about what you’re doing and how you’re doing it. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Emmet – emmet.io free and open source – gives a bunch of expansions for HTML etc. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Emmet plugs into a bunch of different apps (which since I use diff apps at work and home would be really handy) #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Should the logo be in an H1?
Generally: probably not. (Whoops.) But on the homepage it probably makes sense #AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
Use section tags for different sections of the page #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
When do you use <section>? Ummm… for major thematic chunks of a page. It’s indicative of a chunk of the page #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
If everyone did <section> the same way the spec will evolve to meet us #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
“Specs are pavement” – @chriscoyier #aeasea
Don’t worry about the context. It made sense, I promise.
— Josh “Yoshi” Vickerson (@joshvickerson) April 5, 2017
Specs happen when we pave the cowpaths – we codify what the developers are already doing.
<div> is intentionally meaningless, it’s for styling only. If your chunk has meaning use a tag. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
When you’re mocking stuff up <a href=“#0”> because IDs can’t start with a number so the link won’t work #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Obviously you want to go fix all those links later #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
“Naming is hard, so we’ll just call it ‘thing’” – when doing mock ups don’t fuss over your names. “Call it something.” #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Rigid naming conventions might be necessary for much larger teams, but this has worked for @chriscoyier on small and medium teams #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Name spacing in prototypes #aeasea pic.twitter.com/Wi2GralWSd
— Anne Gibson (@perpendicularme) April 5, 2017
“Just use a lot of classes. When in doubt, give it a class.” #aeasea
“TL;DR” name things smart.“— Anne Gibson (@perpendicularme) April 5, 2017
As an Information Architect, I approve of this message.
News from the back room at AEA Seattle: the job title “webmaster” is making a comeback. As are named CSS colors / 216 clr palette. #aeasea
— Jen Simmons (@jensimmons) April 5, 2017
Yank stuff back to the left. Get your selectors as flat as possible. Don’t get too specific. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
When your selectors are so specific that the CSS rule is so specific it’s as long as this line of text, you’re making your life hard. (Looking at you, Sharepoint. *growl*)
CSS files tend to only ever grow. “The CSS file is append only.” “No idea what’ll happen if I delete.“ #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Do things break because they are broken? Or do they break because they are being used in way they weren’t intended? #AEASEA @chriscoyier
— jared bishop (@bishopart) April 5, 2017
Atomic CSS builds minimal CSS files from what actually gets used on pages #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Tachyons.io already has a bunch of classes in its library. 82k of CSS and you only use it. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Some people are very productive in the Tachyons world. (I think it would break my brain.) #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
If 3/4 headers are formatted one way and the 4th is different, it’s worth a conversation on why there’s an alternate #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
This was aimed at discussing things with your designers. Sometimes they’ll hand over a comp where it looks like the difference between the standard component and an alternate is arbitrary. It might be arbitrary, or it might be intentional. It’s worth the conversation to understand the arbitrary from the unintentional – one fewer thing to test and code.
There’s an <address> tag – remember to use it! #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
HTML5 semantics, https://t.co/QsNaXnTifL, and https://t.co/bBQI5ZMRED all have different recommendations for formatting an address #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Every choice you make in HTML is rabbit-hole worthy #AEASEA “This is what robots want. Is it good for you too?”
— Anne Gibson (@perpendicularme) April 5, 2017
Phone numbers… can do nothing, use href=“tel:” format, or both and display:none #AEASEA No good solution yet
— Anne Gibson (@perpendicularme) April 5, 2017
At a minimum, make sure phone number text is selectable so someone can copy it #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Side note: emojis can be totally work in code but databases or CMS might blow up. You can make class names emojis #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
https://t.co/1Zaqbq3OKw has a full CSS file that will immediately style a bunch of your classes depending on how you named them #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Because we used foundation, it automatically handles grids and stuff… good HTML and foundation can get pretty far fast #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Performance: there’s a python command on the Mac to spin up a local web server #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
At this point we’ve got a baseline of about 241k + about 12k on top of that for Foundation’s CSS. Start baselining performance early #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Speedcurve and Calibre and other tools will watch performance all the time #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Note that we’re this far into the session and we’ve written HTML. That’s it. We started with a designed comp and we made sure we knew what we wanted the end result to look like in a prototype. This is an excellent example of building for progressive enhancement. Start with the basics, because they work everywhere, then enhance up. When it’s designed that way you only use the tools you need, you enhance efficiently, and there’s a better chance that your finished product will be accessible.
Time to do some CSS layout.
Sections are block-level elements. What do we do with the edges? #AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
Can do edges with padding, but you can’t really set a max width on the thing… probably need hand-tweaks with media queries #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Or use a div wrapper to do a limited width for the inside sections. Very easy, no harm, but have to remember to do it #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Wrap the whole thing, and limit the width, then use pseudoelements (::before, ::after) to color the edges #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Pseudoelements are the cleanest, most flexible, little off-screen rendering, and forced hidden overflow #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Three boxes in a row: you can float things and clear the float #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Floats require math, clearing the floats, difficult to do equal heights. They’re a hack for page layout. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Display: inline-block is another hack to layout three boxes #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
(Bonus points: i’m finally starting to understand Codepen.) #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Chris helped to found Codepen, which is a web-based “playground” application where you can post things you’re working on and others can see the html, css, and javascript. Until seeing it in action, I totally didn’t get it.
Inline-block doesn’t have equal heights but we can fake it by putting a linear gradient on the container holding the inline blocks #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Equal height boxes by manipulating gradients #aeasea pic.twitter.com/YtUPorTqlG
— Anne Gibson (@perpendicularme) April 5, 2017
We could use a table for our 3 boxes, but a) screen readers announce “this is a table!” and it forces equal heights #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Can use display: table-cell to do table-like layouts. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
(@chriscoyier doesn’t mention you can’t span columns with display: table-cell which is a total PITA for complex designs AMHIK) #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
I know, because we’ve been trying to use it to lay out forms at the day job. grr.
But we have flexbox! So why would we use display: table-cell? Flexbox allows reordering and lots of options #AEASEA https://t.co/SJM47EgxlO
— Anne Gibson (@perpendicularme) April 5, 2017
A flexbox reference:https://t.co/a2UMB40gW8#AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Flexbox is super worth learning. Stuff like this becomes developer muscle memory #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
We can also use CSS Grid to lay out three boxes. Works everywhere but Edge and that can be worked around #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Taking good notes for myself at #aeasea pic.twitter.com/v8pSvKgbZW
— Josh “Yoshi” Vickerson (@joshvickerson) April 5, 2017
Amen, Josh.
Nice to see @chriscoyier live-sketching on an iPad on screen #aeasea pic.twitter.com/DiCDIBsiyN
— Anne Gibson (@perpendicularme) April 5, 2017
https://twitter.com/justcallmejuan/status/849683039273668609
Shout-out to @jensimmons on CSS grid #aeasea pic.twitter.com/1IlRKryc6w
— Anne Gibson (@perpendicularme) April 5, 2017
The only complex part of CSS grid (and flexbox) is gutters, but we’ll probably figure that out as we go #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Grid-gap: 2rem — boom: gutters. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Collapsing grids with display: block is a really useful technique for tiny screens #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Note that @lukew and others who believe mobile-first is the way to go are probably right but we’re doing the opposite today #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
If you haven’t seen Luke’s work on Mobile First, there are lots of videos to catch up on.
Display: Grid doesn’t work well on mobile… but if you’re just going to do a tube of content on mobile anyway who care? #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
“Tube of content” makes me laugh and simultaneously describes most of my mobile designs.
#aeasea @chriscoyier pic.twitter.com/5kIbYlwS4U
— jared bishop (@bishopart) April 5, 2017
Performance check: we added some CSS so we’re at 5 requests and a very small site still #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Decision time: are we going to use custom fonts? Most projects, it’s yes. “It’s hipsterish not to” #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
You can still use an old-school font stack if performance of web fonts is a performance issue #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
System Font Stack – if you don’t care if the font matches across systems, you can use Mac system fonts on Macs & Windows on Windows #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
(But um yeah now you’re using Apple or Microsoft’s branding… see Monday’s sessions.) #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Using web safe fonts or system fonts causes 0 perceived performance problems for webfonts for loading #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Shout out to @superyesmore by @chriscoyier because he’s been reading it a lot. (I posted on Jan 19… https://t.co/gnmpnXr2JU) #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Loading fonts with @font-face and nothing else can be problematic. There are tons of ways to import webfonts #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
.@zachleat getting a shoutout from @chriscoyier at #aeasea pic.twitter.com/1llBCWpIIj
— Josh “Yoshi” Vickerson (@joshvickerson) April 5, 2017
Flash Of Unstyled Text (FOUT) was a big problem when webfonts first came out #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Now browsers wait for the font to load and then display text. (Which is why I get white space on Safari instead.) #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Each browser handles font loading differently. At least with FOUT people could read the site until load #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
There are about 50 other ways to load the text. https://t.co/0EEL0avMqU#AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Font-display: swap;
When this font loads, i want you to swap out the text using this font #AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
You can size type at the html tag level in CSS.
Then you can use rems to size up and down everything at once. #AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
You can also resize by viewport units but um, watch the sizes at small viewports #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
https://twitter.com/DenMcH/status/849693808421765120
Performance check-in: 8 requests, total 265kb. Make sure to turn off local copies of fonts when testing perf. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
SASS – just by using it, we get compression options and @import #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
SASS is shipped with a ton of different applications #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
SASS allows for variables: $font-family-body: /* font list goes here */
Then later
.classname {
font-family: $font-family-body;
}#aeasea— Anne Gibson (@perpendicularme) April 5, 2017
Autoprefixer takes a pass on everything and prefixes places where you might need it #aeasea
— Anne Gibson (@perpendicularme) April 5, 2017
You can be specific about what you want Autoprefixer to prefix. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
You can even have it digest your google analytics data to decide what to prefix #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Time to build an icon system using SVG!#aeasea
— Anne Gibson (@perpendicularme) April 5, 2017
Why to use an icon system
1. Ease of use
2. Consistency
3. Performance#AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
There’s a lot of performance to be gained by not sending an HTTP request for every icon on the page #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
For a long time we did CSS sprites with all our icons in one file #AEASEA
It’s not fun, it’s just clever
— Anne Gibson (@perpendicularme) April 5, 2017
Icon fonts are used for the same reason – still 40 icons in one file. The point is performance #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Vector is such a big deal – there’s no limit to their quality. Super-high-density screens like retina really pushed this #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Icon fonts – change size, change color, text shadow, etc. They looked like a fantastic solution #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Lots of good reasons not to use icon fonts, everyone. Use SVG instead.https://t.co/sVByfA8ebq #aeasea
— Josh “Yoshi” Vickerson (@joshvickerson) April 5, 2017
But then SVG becomes super-well supported. And they’re crisper, easier to position, easier to style, more potential, more accessible #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
The <symbol> tag in the SVG makes it easy to be called by other objects #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
An <SVG> is like a div, and can contain multiple symbols #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
For maintainability, keep all the icons in a folder, then use gulp to put them all into a single file #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Gulp isn’t the only one that can create a folder full of symbols #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
The Noun Project has an app for the Mac that provides the ability to search for icons, color them, and download them to your desktop #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
You can also optimize your PNGs right in your gulp build process https://t.co/98b7w09HeL #aeasea #svg
— Jacob Wayne Smith (@j8ke) April 5, 2017
Do keep an eye on what you’re downloading to ensure they’re consistent #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Illustrator has an Asset Export panel for multiple art boards in a file, and it exports multiple file types at once #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Sketch also allows for multiple named art boards with an easy export feature #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Icons can be fancy, not just single color. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Options for combining SVGs into a file…
Grunt
Gulp
IcoMoon
Our own fingers#AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
IcoMoon is a web app that lets you select a bunch of SVGs and download both a folder of them and a sprite #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
There’s extra DOM weight to putting the same SVG image all over an html file – “use” is cleaner, performance is probably negligible #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
HTML abstraction
For this demo, we’re going to use the language Pug #AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
If you’ve never heard of Pug, it used to be called Jade #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Pug HTML-ish text compiles to HTML. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
https://twitter.com/DenMcH/status/849722518831153152
Pug allows you to include HTML chunks, something like what PHP does #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
When building multi-page sites, it’s immediately useful to abstract things like the header and footer #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
CMSs are essentially HTML abstractions of templates #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
WordPress themes and templates do this using php #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Pug is whitespace-sensitive; indentations determine children #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Includes can have includes in Pug. So we can include icons.pug, which could then include the icons #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Demo is the simplest form of the pages, but it could’ve been accordions and other similar things if we had >6 hours #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Responsive tables!
Tables are appropriate to use for tabular data.
(My life is tabular data. Sigh.) #AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
When tables squish down though, you might lose data. Or they read like crap. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Put a div around the table and overflow:x-auto so it scrolls. That’s one solution #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Some devices don’t actually show the scrollbar- WebKit will allow you to style the scrollbar #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Brad Frost’s Adaptive Map pattern: below a certain size pull back a static image of the map instead of the interactive map #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Zooming out to see a table is a problem, so we don’t want to do that if we don’t have to #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
One option is to turn the row into a chunk of data and stack those chunks #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Another pattern is to collapse the data into tabs. (You can’t cross-reference in that format.) #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Bootstrap 4 offers scroll left-right on tables #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
https://t.co/9pv7NPMxz6 offers a fixed left column #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Think about what people want to do with the table before picking a solution #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Do they need to compare? Which data is the most important? Can you hide things/show things? #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Filament Group has a repo called Tablesaw which has bunch of ways to deal with responsive tables #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Tablesaw link: https://t.co/J0upWEGEiB #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Time for some Javascript! #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
jQuery – 72% of all websites use it (according to sources) but are we going to use it? #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
I need to do a lot of “find something / do something“ – yes to jQuery #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
I’m doing a tiny bit of stuff – no to jQuery #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
My site is state-heavy and I want an actual framework to manage it – no jQuery #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
For some projects, mobile-first might not actually be the primary choice. Codepen would be really hard to do in mobile. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
On the other hand, a site for presentation should definitely be done mobile-first so it can go anywhere #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Once you get through the hard mobile-first choices it becomes “Oh hey now we have more room! What can we add?” #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
(I have never used a Javascript library except when forced.)
(I have a bad habit of coding in php too.) #AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
Write a script for your script. Like write down what you want to have happen in normal words #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
The script can help identify things you need. “When I click this button…” = “addEventListener”#AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Structurally, start with a function, then table of contents, then structure of each of the elements #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
https://twitter.com/DenMcH/status/849734802878025729
Framework of the javascript #AEASEA pic.twitter.com/nparupS5ea
— Anne Gibson (@perpendicularme) April 5, 2017
button.addEventListener(“click”, function());
There’s adding an event listener to a button #AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
https://twitter.com/DenMcH/status/849735845657534464
At what point do we reach for a big framework like React, Vue, or Ember? #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
– A site that is heavy on data and state
– A single page app (SPA)
– a site built from front-end APIs like a headless CMS setup #aeasea— Anne Gibson (@perpendicularme) April 5, 2017
The images on the demo site are a performance hit.
First step, optimize them. ImageOptim is a good Mac app #AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
“The most satisfying thing ever is to process every single image asset on your entire website in one commit” #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
You may be able to install jpegoptim on the server and optimize the images directly on the server #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Image optimizers are updated on a regular basis so do this like quarterly or so #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
.@chriscoyier has a rule in Hazel to automatically optimize images on his desktop, even screenshots #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
The other big performance win is using responsive images in html #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
You have a 1200px version, also make a 600px, then use srcset to let the browser choose the appropriate one #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Eric Portis wrote a good A List Apart article on Responsive Images in Practice that covers scrset.
We’re trying to avoid downloading extra images, so that’s why we have to tell the browser so much about the image #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
“Sizes” is an img attribute that provides CSS information on the browsers – if it’s bigger than X, this size, otherwise that size #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
How do you know what the best versions of the images are? https://t.co/XSRwq5uHy4 helps with that #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Depends on
– Site layout and RWD choices
– How many images are practical
– If you deal with pixel density
– Art direction #AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
Even after that, the sizes attribute depends entirely on what you’re doing with it #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Steps for big media-heavy sites #aeasea pic.twitter.com/lrg1L6waTr
— Anne Gibson (@perpendicularme) April 5, 2017
A medium job of handling images – lazy-loading can help, CDNs help. Lazy-loading requires javascript and can be problematic #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
The whole point of responsive images is to be responsible about bandwidth, and lazy-loading can help with that too #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Media queries give us most of the control we care about for background images #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Performance check-in. At 400px , we’re at 225kb, and at 1200px we’re at 362k. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Probably can’t use symbols in background-image CSS directly but you’d have to do it old-school #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
CSS clip-path maker does awesome things to help you see what a clip path might look like. https://t.co/qwAEowiVx8 #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
When you put clip-paths on things, you can cover chunks of the item you’re applying the clip path to. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Clip-paths can be transitioned. Hover states can have them. They’re relatively performant. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
The easiest things you can do to fix performance is optimize images, gzipping files, and provide far-out cache headers #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Can we make a site work without a network connection? And should we? #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Service Workers are the key to ensure offline access. It’s really Javascript low-level access to what the browser does. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
You can do things like affect what a browser does with HTTP requests. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
navigator.serviceWorker.register(‘/service_worker.js’);
(Only we’d write better code around this…) #AEASEA— Anne Gibson (@perpendicularme) April 5, 2017
https://twitter.com/DenMcH/status/849753762025529344
Make sure to console.log everything in service workers so you know what’s going on #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
.@chriscoyier prefixes his console.log items with CLIENT: to tell the log that it’s the registration code sending the logs #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Service workers can only deal with files at the same scope as it or deeper. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
In the serviceWorker.js file, @chriscoyier prefixes his console logs with WORKER: to make it clear where they’re coming from #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
There are boilerplate files for service workers out on the web (and @adactio explained them yesterday) so lots of guidance #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Chrome has an “offline” button in the inspector that lets you see what your site does when you’re offline #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
A site with a serviceWorker can still display offline, which is great when it’s a small presentation-heavy site #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
The concepts you’ve seen are real, but the situations are made up. Front-end developers do this stuff every day. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
“A front-end developer is aware” – @chriscoyier #aeasea pic.twitter.com/Ao8fLYF48y
— Josh “Yoshi” Vickerson (@joshvickerson) April 5, 2017
Front-end developers are aware of design, aware of the network, aware of DevOps, aware of the back-end, how things are tested… #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
A senior front-end developer has to have experience, a track record of good judgement #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
You need to have an impact beyond the direct job. You can be a force multiplier #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017
Take what you know and make other people good at their jobs too. #AEASEA
— Anne Gibson (@perpendicularme) April 5, 2017