<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>daverupert.com</title>
    <description></description>
    <link>http://daverupert.com</link>
    <atom:link href="/atom.xml" rel="self" type="application/rss+xml" />
    
      <item>
        <title>Team Incentives in Overwatch</title>
        <description>&lt;picture&gt;
  &lt;img src=&quot;/images/posts/2017/owc_team.png&quot; alt=&quot;USA vs Sweden in the Overwatch World Cup&quot; /&gt;
&lt;/picture&gt;

&lt;p&gt;The past year has brought me much joy (and curse words) to play Overwatch with
friends and strangers on the Internet a few nights a week. It’s hard to
overstate how much of a team sport this game is. Even at medium levels of
gameplay a single underperforming player will cost the match. Unfortunately,
there isn’t much of an incentive system to behave as a cooperative team member.&lt;/p&gt;

&lt;p&gt;When you end a match in Overwatch there’s a little button in the bottom right of
the screen that says “Stay as Team”. The button has a wonderful UX, it glows and
dings just the right amount when clicked. But the general rule of thumb is:
&lt;strong&gt;Never click this button. It is a penalty&lt;/strong&gt;. The result is longer queue times
and you’ll probably lose your next match.&lt;/p&gt;

&lt;p&gt;Generally, the larger your team, the longer the queue time. Overwatch tries to
match you up to a similarly sized team with similar user ranking. That takes
time. Once a match is found, your ad-hoc 6-stack will then match up against a
true 6-stack of people who play together all the time (because only really
dedicated people would suffer 5-minute wait times to queue in a 6-stack). Now
your team is at an extreme disadvantage, and will likely get demoralized and
disband.&lt;/p&gt;

&lt;p&gt;Losing badly negatively effects team play. No one thinks they’re the problem.
It’s not uncommon for players to openly flame (which is a nice way to say
“verbally harass”) other players instead of focusing on how to improve the team
dynamic. Competitive tension is so high, posturing and prejudgement about who is
going to cost the match often happens even before the match has started.&lt;/p&gt;

&lt;p&gt;The long-term benefits of being a consistent team player are obvious, you win
more games with better teamwork. But the short term reinforcement is that
clicking the “Stay as Team” button produced a negative outcome. So we all queue
up like lone Rōnin and repeat the cycle every 15-minutes.&lt;/p&gt;

&lt;p&gt;I think a lot about incentives. Are there levers to pull in order to reduce
toxicity and improve the overall experience?&lt;/p&gt;

&lt;p&gt;Blizzard has recently started banning “one-tricks”, people who only play one
character and won’t switch, in an effort to encourage team cooperation. While
this is probably necessary, it’s a negative incentive for bad teamwork. I’d love
to see more positive incentives for good team work.&lt;/p&gt;

&lt;p&gt;Here are just some examples:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A &lt;code&gt;sportsmanship&lt;/code&gt; ranking that factors into match matching heuristics.&lt;/li&gt;
  &lt;li&gt;Clan feature? Heck, Blizzard made World of Warcraft.&lt;/li&gt;
  &lt;li&gt;Instead of Play of the Game featuring only a single player, maybe POTGs could
highlight awesome teamwork (combo-ults, etc).&lt;/li&gt;
  &lt;li&gt;Instead of performance voting at the end of each map, you vote for “Most
Positive” or “Most Grouped Up” team member.&lt;/li&gt;
  &lt;li&gt;Improved team queue times.&lt;/li&gt;
  &lt;li&gt;Artificially increasing queue times for solo players after certain rank.&lt;/li&gt;
  &lt;li&gt;Special loot for people who successfully queue up in teams (e.g. Rewards for
100 games played as a 3/4/5/6-stack, etc). There’s
&lt;a href=&quot;https://youtu.be/gqZLYqexmUs&quot;&gt;some science to suggest in-game loot and player performance are interconnected&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I don’t really care what it is, but I’d love to see Blizzard thinking and
talking about positive incentives to nudge players to play well with others. Not
just banhammers.&lt;/p&gt;
</description>
        <pubDate>Wed, 22 Nov 2017 00:00:00 -0600</pubDate>
        <link>http://daverupert.com/2017/11/team-incentives-in-overwatch/</link>
        <guid isPermaLink="true">http://daverupert.com/2017/11/team-incentives-in-overwatch/</guid>
      </item>
    
      <item>
        <title>Happier HTML5 Form Validation</title>
        <description>&lt;p&gt;I recently embarked on improving the client-side form validation for a client.
There were about 400 lines of form validation code stuffed inside a 1000 line
&lt;code&gt;form_helper.js&lt;/code&gt;. I looked for lightweight form validation scripts but after
some hemming and hawing I decided to try my hand (again) at native HTML5 Form
Validation.&lt;/p&gt;

&lt;p&gt;If you’ve ever experimented with HTML5 Form Validation, you’ve probably been
disappointed. The out-of-box experience isn’t quite what you want. Adding the
&lt;code&gt;required&lt;/code&gt; attribute to inputs works wonderfully. However the styling portion
with &lt;code&gt;input:invalid&lt;/code&gt; sorta sucks because empty inputs are trigger the &lt;code&gt;:invalid&lt;/code&gt;
state, even before the user has interacted with the page.&lt;/p&gt;

&lt;p&gt;I finally sat down and spent a couple days trying to make HTML5 Form Validation
work the way I want it. I had the following goals:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Leverage browser-level feedback, free focus management and accessible
labelling&lt;/li&gt;
  &lt;li&gt;Only validate inputs on submit&lt;/li&gt;
  &lt;li&gt;Styling with &lt;code&gt;.error&lt;/code&gt; class&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With this wishlist in hand, I set off and found a solution that works with only
6 lines of code.&lt;/p&gt;

&lt;h2 id=&quot;the-setup&quot;&gt;The Setup&lt;/h2&gt;

&lt;p&gt;First we create a basic HTML5 form with a &lt;code&gt;required&lt;/code&gt; attributes on inputs we
want to validate…&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;form action=&quot;/users/signup&quot; method=&quot;post&quot;&amp;gt;
    &amp;lt;label for=&quot;email&quot;&amp;gt;Email&amp;lt;/label&amp;gt;
    &amp;lt;input id=&quot;email&quot; type=&quot;email&quot; required&amp;gt;
    ...
    &amp;lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And then we need the CSS for the error state…&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;input.error {
  border-color: red;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Again, we want to use a CSS class and not the &lt;code&gt;input:invalid&lt;/code&gt; pseudo-class
because even before the user interacts with the form on the page,
&lt;code&gt;input:invalid&lt;/code&gt; makes it look like the user made an error. This is a bad UX.
Never blame the user.&lt;/p&gt;

&lt;h2 id=&quot;-form-validation-in-6-lines-of-js&quot;&gt;😱 Form Validation in 6 Lines of JS!&lt;/h2&gt;

&lt;p&gt;I instinctually reached for the &lt;code&gt;submit&lt;/code&gt; event to try and manipulate error
handling. However, this won’t work because the &lt;code&gt;invalid&lt;/code&gt; event from the inputs
block the form’s &lt;code&gt;submit&lt;/code&gt; event from firing. It’s good that our form won’t try
to submit invalid data I wasn’t sure how to validate a form that was never
submitted. I tried a few grossly complex workarounds.&lt;/p&gt;

&lt;p&gt;Eventually, I discovered the simplest solution by hooking into the input’s
&lt;code&gt;invalid&lt;/code&gt; event. Just before the &lt;code&gt;submit&lt;/code&gt; event, the browser performs a
&lt;code&gt;form.checkValidity()&lt;/code&gt; check which checks all the inputs. All inputs with
invalid data fire the &lt;code&gt;invalid&lt;/code&gt; event to say “Hey, I have invalid data!” It’s
here that we can apply the error class we need.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;const inputs = document.querySelectorAll(&quot;input, select, textarea&quot;);

inputs.forEach(input =&amp;gt; {
  input.addEventListener(
    &quot;invalid&quot;,
    event =&amp;gt; {
      input.classList.add(&quot;error&quot;);
    },
    false
  );
});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;🎉 We did it! Now when a form is submitted, the &lt;code&gt;invalid&lt;/code&gt; event fires on invalid
inputs, and we add an &lt;code&gt;.error&lt;/code&gt; class which adds a red border around the input.
And we’re done! &lt;code&gt;172b&lt;/code&gt;. Form validation that fits in a tweet.&lt;/p&gt;

&lt;p&gt;♿ The best part is we’re leveraging the browser’s focus management and
accessibility behaviors. When a form submission is prevented, the first
&lt;code&gt;:invalid&lt;/code&gt; input gets focused and screen readers read out the error message for
that input. This is great. Focus management isn’t fun to code.&lt;/p&gt;

&lt;p&gt;💪 We’re also leveraging HTML5 input types for common pattern matching.
&lt;code&gt;input[type=&quot;email&quot;]&lt;/code&gt; expects an email address and the error messaging will say
something along those lines. Same with &lt;code&gt;input[type=&quot;url&quot;]&lt;/code&gt;,
&lt;code&gt;input[type=&quot;number&quot;]&lt;/code&gt;, etc. HTML input types are basic but powerful stuff.&lt;/p&gt;

&lt;p&gt;But wait there’s more complex things we can do!&lt;/p&gt;

&lt;h2 id=&quot;optional-validate-on-blur&quot;&gt;Optional: Validate on Blur&lt;/h2&gt;

&lt;p&gt;If you like your forms to immediately flag errors after leaving each input
(which that’s fine, I’m not judging), it’s pretty easy to add that
functionality. In fact, it’s just an additional 3 lines of code…&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;input.addEventListener(&quot;blur&quot;, function() {
  input.checkValidity();
});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This On &lt;code&gt;:invalid&lt;/code&gt; inputs, it will trigger the &lt;code&gt;invalid&lt;/code&gt; event and add the
&lt;code&gt;.error&lt;/code&gt; class we programmed above.&lt;/p&gt;

&lt;h2 id=&quot;optional-validate-regex-patterns&quot;&gt;Optional: Validate Regex Patterns&lt;/h2&gt;

&lt;p&gt;I thought this was going to be awful and ruin my simple solution. Custom error
messaging could be gnarly as well. But NOPE. HTML gods spared me. Behold, regex
pattern matching in ZERO lines of JavaScript!&lt;/p&gt;

&lt;p&gt;By using a &lt;code&gt;title&lt;/code&gt; attribute to describe the expected data input and a &lt;code&gt;pattern&lt;/code&gt;
attribute with a regex pattern, we can pretty much validate against anything we
want.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;label for=&quot;alpha&quot;&amp;gt;Alphanumeric Only&amp;lt;/label&amp;gt;
&amp;lt;input id=&quot;alpha&quot; type=&quot;text&quot; pattern=&quot;[a-zA-Z0-9]+&quot; title=&quot;Only alphanumeric characters allowed&quot; required/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;There’s even a website, &lt;a href=&quot;http://html5pattern.com/&quot;&gt;HTMLPattern.com&lt;/a&gt;, that has
the regex for almost every kind of validation you’d ever want to create.&lt;/p&gt;

&lt;h2 id=&quot;demo-putting-it-all-together&quot;&gt;Demo: Putting it all together&lt;/h2&gt;

&lt;p&gt;Here’s a Codepen of a complete working form with Pattern Matching using this
approach.&lt;/p&gt;

&lt;p data-height=&quot;300&quot; data-theme-id=&quot;11781&quot; data-slug-hash=&quot;YErprg&quot; data-default-tab=&quot;result&quot; data-user=&quot;davatron5000&quot; data-embed-version=&quot;2&quot; data-pen-title=&quot;Native form validation onsubmit with pattern??&quot; class=&quot;codepen&quot;&gt;See the Pen &lt;a href=&quot;https://codepen.io/davatron5000/pen/YErprg/&quot;&gt;Native form validation onsubmit with pattern??&lt;/a&gt; by Dave Rupert (&lt;a href=&quot;https://codepen.io/davatron5000&quot;&gt;@davatron5000&lt;/a&gt;) on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;script async=&quot;&quot; src=&quot;https://production-assets.codepen.io/assets/embed/ei.js&quot;&gt;&lt;/script&gt;

&lt;h2 id=&quot;tradeoffs&quot;&gt;Tradeoffs&lt;/h2&gt;

&lt;p&gt;Every solution is a system of tradeoffs. The major tradeoff we’re making here is
that in leiu of controlling the styling of client-side validation errors, we’re
leveraging the browsers native tooltip-style validation messages. It doesn’t
look the coolest, but it works really well for casual client-side validation.&lt;/p&gt;

&lt;p&gt;Instead of being perscriptive about error messaging, we use what the browser
natively gives us. We’re of course doing server-side validation and are free to
style those errors however we want (usually that’s a more critical error and
needs a better UX).&lt;/p&gt;

&lt;p&gt;If this is unacceptable, &lt;a href=&quot;https://hyperform.js.org/&quot;&gt;Hyperform.js&lt;/a&gt; is a pretty
small (32kb minfied / 9kb gzipped) reimplementation of the same HTML5 Form
Validation API in JavaScript, but with additions to iron out some weird parts.&lt;/p&gt;

&lt;p&gt;Let me know if you try this and have any problems with the approach. I’ll
probably use this as a starting point for every project ever. Happy coding!&lt;/p&gt;
</description>
        <pubDate>Fri, 17 Nov 2017 00:00:00 -0600</pubDate>
        <link>http://daverupert.com/2017/11/happier-html5-forms/</link>
        <guid isPermaLink="true">http://daverupert.com/2017/11/happier-html5-forms/</guid>
      </item>
    
      <item>
        <title>The Medium</title>
        <description>&lt;p&gt;I’ve had a few similar conversations lately with colleagues I admire in the Web industry. They’ve all mentioned that they are a bit tired and burnt out. This happens, especially over time. But there is a trend. For most it comes down to the fact that the etherial World Wide Web, The Medium that we all love, appears broken or unrepairable.&lt;/p&gt;

&lt;p&gt;The Medium which tied the world together is being used and exploited to drive us apart. Social networks promote abuse. &lt;a href=&quot;https://www.npr.org/2017/11/05/562058208/how-russia-weaponized-social-media-with-social-bots&quot;&gt;Our data and personal information are weaponized against us&lt;/a&gt;. Chatbots competitively one-up eachother over conspiracy theories, gathering data. The endless daily news cycle of multiple things to be outraged about is exhausting for most non-robots. In many ways the central question of “What’s happening?” has changed to “What are we mad about?”&lt;/p&gt;

&lt;p&gt;It’s hard to divorce the The Medium from the problems of the Physical World. Death. Struggle. Injustice. Politics. This sustained level of IRL civic engagement is tiring, but I will keep my eyes on the prize, hold on.&lt;/p&gt;

&lt;p&gt;Alas, even the etherial currency created for The Medium is now working to destroy Physical World. &lt;a href=&quot;https://motherboard.vice.com/en_us/article/ywbbpm/bitcoin-mining-electricity-consumption-ethereum-energy-climate-change&quot;&gt;One Bitcoin transaction now uses as much energy as your house in a week&lt;/a&gt;. If it were me, I’d shut down this experiment. It is immoral.&lt;/p&gt;

&lt;p&gt;But that’s part of the problem, isn’t it? We’re building things without regard for the ethical implications. Especially, if ignoring the ethical ramificiations happens to create wealth. “Peak capitalism” I guess it’s called. As we yield control over to artificial intelligence and learned machines, I can only hope their trainers considered more than efficiency and capitalism.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://staltz.com/the-web-began-dying-in-2014-heres-how.html&quot;&gt;The Medium is slowly being owned by a handful of companies&lt;/a&gt;. Reports of the Web’s death are greatly exaggerated, but concentrations of power rarely end up well for the general public.&lt;/p&gt;

&lt;p&gt;For the physical pixels and bytes delivered to the glowing screens, I have heard specific concerns as well.&lt;/p&gt;

&lt;p&gt;Recently in a talk about design I heard that “UX is a solved problem.” This particular use of “UX” was in the context of GUIs. That’s a bit deflating and hard to rebut. But maybe in some ways this is a relief, in less than 20 years we’ve managed to upload enough wisdom and shared knowledge into The Medium, that problems are no longer problems. Our knowledge can be automated and we can start thinking about bigger problems.&lt;/p&gt;

&lt;p&gt;As browsers have gotten better and eliminated age-old problems, the build tools have gotten more complicated. In a recent talk on Source Maps I heard that “JavaScript is a compiled language”, which is to say the output sent to the browser more resembles a binary format than its human readable source. This is true, though not required. For me, I feel the complex toolchain disconnecting me from the instant gratification of publishing to the Web.&lt;/p&gt;

&lt;p&gt;Lord, save me from my Ludditism.&lt;/p&gt;

&lt;p&gt;I share the disillusionment. This version of The Medium is not The Medium I want or fell in love with. This is a love story about humans connecting across continents. I want to be hopeful even at the risk of being naïve.&lt;/p&gt;

&lt;p&gt;I have to keep reminding myself that I do have some control. I can build The Medium I want. I can cling to what’s good. And this gives me hope.&lt;/p&gt;
</description>
        <pubDate>Fri, 10 Nov 2017 00:00:00 -0600</pubDate>
        <link>http://daverupert.com/2017/11/the-medium/</link>
        <guid isPermaLink="true">http://daverupert.com/2017/11/the-medium/</guid>
      </item>
    
      <item>
        <title>Is Heart the greatest rock band ever?</title>
        <description>&lt;p&gt;Let me break this down for you.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Two women leads.&lt;/strong&gt; This is rare even today. This Lead Vocalist Ann Wilson and the lead guitarist Nancy Wilson are incredible. They both shred. Oh an…&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;They were sisters.&lt;/strong&gt; Did you notice that? Not only were they rock’n’rollers, but sisters. This is a 10x awesome factor.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Ann Wilson shreds.&lt;/strong&gt; Still quite possibly the most heavy metal vocalist ever.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Nancy Wilson shreds even harder.&lt;/strong&gt; I’d trade all my teeth to have even just a quarter of Nancy Wilson’t raw talent and guitar skills.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;The other guitarist &lt;a href=&quot;https://en.wikipedia.org/wiki/Roger_Fisher_(guitarist)#/media/File:Roger_Fisher_-_Heart_-_1978.jpg&quot;&gt;Roger Fisher played a two necked guitar&lt;/a&gt;&lt;/strong&gt;. This is all you need to know. That is bad ass.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Roger Fisher also &lt;a href=&quot;https://www.youtube.com/watch?v=Ps7tVvQHLyo&quot;&gt;wore a satin karate gi on stage&lt;/a&gt;.&lt;/strong&gt; I’m gonna let that one sink in. Then when you’ve recooperated from this mind blowing fact, &lt;a href=&quot;http://www.fu-tone.com/catalog/images/artists/Roger-Fisher-Heart-800.jpg&quot;&gt;checkout these wierd thong bellbottoms thing&lt;/a&gt; and check yourself into the hospital because you just got rocked.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;They did all this before MTV.&lt;/strong&gt; MTV switched on and got flooded with glam rock. But that didn’t stop them, they adapted, sissied up and met that synth rock pop music and grabbed another handful of Billboard Top 10 hits.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Look. You’re not gonna win on this one. You probably just ought to admit I’m right. You’ll probably drop the “Led” on me and think you countered my lvl 70 wizard spell, but in the year 2017 ain’t nobody got time to listen to a 42-minute guitar solo.&lt;/p&gt;

&lt;p&gt;Toto? Did you say “Toto”? Well, now, maybe you have an argument…&lt;/p&gt;
</description>
        <pubDate>Thu, 02 Nov 2017 00:00:00 -0500</pubDate>
        <link>http://daverupert.com/2017/11/is-heart-the-greatest-rock-band-ever/</link>
        <guid isPermaLink="true">http://daverupert.com/2017/11/is-heart-the-greatest-rock-band-ever/</guid>
      </item>
    
      <item>
        <title>Me listening to any song by The Police</title>
        <description>&lt;p&gt;The following is an accurate account of me listening to any song by The Police:&lt;/p&gt;

&lt;p&gt;“Aw, hell yeah. The Police. Turn it up.”&lt;/p&gt;

&lt;p&gt;“Huh. This guitar. Rrrrrough.”&lt;/p&gt;

&lt;p&gt;“Chorus pedals.”&lt;/p&gt;

&lt;p&gt;“So um. Are The Police a good rock band or a shitty reggae band?”&lt;/p&gt;

&lt;p&gt;“What is up with this drummer? The last measure is super crammed and sorta all over the place. But I can’t tell if this is good drumming or bad drumming so I better just nod and make cool faces when it gets weird.”&lt;/p&gt;

&lt;p&gt;“Was that a harmonica?”&lt;/p&gt;

&lt;p&gt;“These guys are all blonde and look like eachother huh.”&lt;/p&gt;

&lt;p&gt;“Whoah. What’s this song actually about?”&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;It’s neat that The Police hits tend to have an unexpected twist. “Every Breath You Take” is a devotional about stalking someone. “Roxanne” is a powerfully emotive song about falling in love with a prostitute. “So Lonely” is a quite upbeat song about being lonely, broken-hearted, and depressed. In “Message in a Bottle” he’s not rescued by sending out an S.O.S. but instead receives millions of messages from other castaways.&lt;/p&gt;
</description>
        <pubDate>Wed, 01 Nov 2017 00:00:00 -0500</pubDate>
        <link>http://daverupert.com/2017/11/me-listening-to-any-song-by-the-police/</link>
        <guid isPermaLink="true">http://daverupert.com/2017/11/me-listening-to-any-song-by-the-police/</guid>
      </item>
    
      <item>
        <title>Transpiled for-of Loops are Bad for the Client</title>
        <description>&lt;p&gt;This is the story of picking the right JavaScript for-loop. On a client project &lt;a href=&quot;https://twitter.com/drjmjones&quot;&gt;Julian Jones&lt;/a&gt; and I casually wrote heaps of &lt;code&gt;NodeList.prototype.forEach()&lt;/code&gt; for the DOM manipulation in our Pattern Library.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;const inputs = document.querySelectorAll('input, select, textarea');

inputs.forEach(function(input){
    console.log(input);
});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;forEach()&lt;/code&gt; on a NodeList is very new. It didn’t even work in Edge until this summer so I knew it would fail in older browsers. Our strategy was to use Babel to fix this for us. Unfortunately, &lt;a href=&quot;https://twitter.com/davatron5000/status/912404469115125765&quot;&gt;we learned&lt;/a&gt; that Babel doesn’t transpile &lt;code&gt;forEach()&lt;/code&gt; statements. Hm. Twitter apparently thinks you’re an idiot if you didn’t know this about Babel, so we set off to look for a workaround.&lt;/p&gt;

&lt;h2 id=&quot;forof-loops-to-the-rescue&quot;&gt;&lt;code&gt;for...of&lt;/code&gt; Loops to the Rescue!&lt;/h2&gt;
&lt;p&gt;After some initial exploration, we decided to switch to &lt;code&gt;for...of&lt;/code&gt;-loops instead.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;const inputs = document.querySelectorAll('input, select, textarea');

for(let input of inputs) {
    console.log(input);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The syntactic sugar of the auto-assigned variables gave this the edge over writing traditional for-loops. Running it through the &lt;a href=&quot;https://babeljs.io/repl/&quot;&gt;Babel REPL tool&lt;/a&gt; gave us some confidence that it would transpile giving us the backwards-compat we needed.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;'use strict';

var inputs = document.querySelectorAll('input, select, textarea');

var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;

try {
    for (var _iterator = inputs[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        var input = _step.value;

        console.log(input);
    }
} catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
} finally {
    try {
        if (!_iteratorNormalCompletion &amp;amp;&amp;amp; _iterator.return) {
            _iterator.return();
        }
    } finally {
        if (_didIteratorError) {
            throw _iteratorError;
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The transformed output of &lt;code&gt;for...of&lt;/code&gt;-loops is an ugly &lt;code&gt;try {} catch {} finally { try {} finally {} }&lt;/code&gt; statement, but whatever, it solves the problem and computers be computers, right?!&lt;/p&gt;

&lt;p&gt;However. &lt;strong&gt;This doesn’t work in IE11&lt;/strong&gt;. Surprise! &lt;code&gt;'Symbol' is undefined&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Symbol.iterator&lt;/code&gt; is a relatively new ES6 language feature that doesn’t exist in IE11. This error was a bit unexpected in that even with an &lt;code&gt;IE &amp;gt; 8&lt;/code&gt; flag, Babel only takes care of the syntax not the feature support. To put it another way, I was surprised the backwards-compat machine didn’t take care of the backwards-compat.&lt;/p&gt;

&lt;p&gt;Ironically, &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of#Browser_compatibility&quot;&gt;browser support for &lt;code&gt;for...of&lt;/code&gt;&lt;/a&gt; is greater than &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/iterator#Browser_compatibility&quot;&gt;&lt;code&gt;Symbol.iterator&lt;/code&gt; support&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Chalk it up again to my ignorance of how Babel works, the feedback from Twitter was that I needed to polyfill &lt;code&gt;Symbol&lt;/code&gt;. First stop, I looked at &lt;code&gt;babel-polyfill.js&lt;/code&gt; but was surprised to see it is &lt;a href=&quot;https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.js&quot;&gt;&lt;code&gt;259kb&lt;/code&gt; unminified/uncompressed&lt;/a&gt;. I’m sure it does a lot, but the entire JavaScript bundle for the whole site is only &lt;code&gt;93kb&lt;/code&gt; unminified/uncompressed. It’s hard for me to recommed a +300% increase.&lt;/p&gt;

&lt;p&gt;Then it was suggested to use Babel with &lt;code&gt;preset-env&lt;/code&gt; and &lt;code&gt;babel-polyfill&lt;/code&gt; which if configured right (heh) injects an &lt;code&gt;import&lt;/code&gt; statement for &lt;code&gt;es6.symbol.js&lt;/code&gt; which Webpack then takes and bundles together for the client. Once that’s all configured and &lt;code&gt;npm install&lt;/code&gt;‘d, we finally have a for-loop!&lt;/p&gt;

&lt;p&gt;I started getting uncomfortable with my options.&lt;/p&gt;

&lt;p&gt;Re-looking at the transpiled output, we wondered if traditional for-loops were a better way to avoid the &lt;code&gt;try-catch&lt;/code&gt; mess. Fortunately, we decided to retrace our steps and re-evaluate &lt;code&gt;NodeList.prototype.forEach()&lt;/code&gt;…&lt;/p&gt;

&lt;h2 id=&quot;nodelistprototypeforeach-for-the-win&quot;&gt;&lt;code&gt;NodeList.prototype.forEach()&lt;/code&gt; for the Win!&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;forEach()&lt;/code&gt; was our original choice and has the syntactic sugar we craved. We were surprised to discover the &lt;a href=&quot;https://github.com/imagitama/nodelist-foreach-polyfill/blob/master/index.js&quot;&gt;&lt;code&gt;NodeList.prototype.forEach()&lt;/code&gt; polyfill is only ~&lt;code&gt;200b&lt;/code&gt;&lt;/a&gt;. New browsers leverage the new language features as well. This lightweight solution seemed too good to be true so we started by rolling back a few for-loops to see the impact. After each save, we noticed the bundle size dropping by ~&lt;code&gt;700b&lt;/code&gt; for each for-loop we reverted.&lt;/p&gt;

&lt;p&gt;All said and done, we converted 15 for-loops to &lt;code&gt;NodeList.prototype.forEach()&lt;/code&gt; and shaved off &lt;code&gt;9kb&lt;/code&gt; from our unminified/uncompressed bundle (10% reduction) and increased our browser compatibility back to IE9.&lt;/p&gt;

&lt;h2 id=&quot;conclusion-transpiled-forof-loops-are-bad-for-the-client&quot;&gt;Conclusion: Transpiled &lt;code&gt;for...of&lt;/code&gt; Loops are Bad for the Client&lt;/h2&gt;

&lt;p&gt;This leads me to my link-bait title conclusion; I think &lt;code&gt;for...of&lt;/code&gt; loops being run through Babel and served to the client is an anti-pattern. Transforming adds &lt;code&gt;658b&lt;/code&gt; of &lt;code&gt;try-catch&lt;/code&gt; code per for-loop. With something as foundational as a for-loop, this adds up to a not insignificant amount of non-DRY code delivered to the client. The Babel fallback uses &lt;code&gt;Symbol.iterator&lt;/code&gt; which doesn’t increase compatibility in older browsers and leads to more polyfilling. Newer browsers don’t leverage new language features, they get the transpiled &lt;code&gt;try-catch&lt;/code&gt; statements.&lt;/p&gt;

&lt;p&gt;If you live in a ES6+-only Browsertopia, then &lt;code&gt;for...of&lt;/code&gt; loops are probably great but I’d question the need to transpile that language feature.  There are &lt;a href=&quot;https://www.eventbrite.com/engineering/learning-es6-for-of-loop/&quot;&gt;advantages of ES6 for-of loops&lt;/a&gt;, but that seems limited to when you want to &lt;code&gt;break;&lt;/code&gt; and exit a loop early instead of looping through every item. For client-side DOM manipulation, I typically find myself looping through every element I have querySelected.&lt;/p&gt;

&lt;p&gt;I don’t enjoy &lt;a href=&quot;http://trentwalton.com/2010/02/18/position-absolute/&quot;&gt;living in absolutes&lt;/a&gt;, but I think it’s important to find lightest possible solution that meets your needs. In this instance &lt;code&gt;NodeList.prototype.forEach()&lt;/code&gt; allowed us to write cleaner code and output less code and I believe that it is a better approach on the client.&lt;/p&gt;

&lt;h2 id=&quot;bonus-conclusion-what-the-hell-are-we-doing-here&quot;&gt;Bonus conclusion: What the hell are we doing here?&lt;/h2&gt;

&lt;p&gt;This story is just a personal reminder for me to repeatedly question what our tools spit out. I don’t want to be the neophobe in the room but I sometimes wonder if we’re living in a collective delusion that the current toolchain is great when it’s really just morbidly complex. More JavaScript to fix JavaScript concerns the hell out of me. Especially given that &lt;a href=&quot;https://infrequently.org/2017/10/can-you-afford-it-real-world-web-performance-budgets/&quot;&gt;JS on the average mobile client is an expensive resource&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I’m not sure this is an issue with Babel per-se, but maybe a more meta topic of the cost of polyfilling. In fact, a quick look at my codebase tells me that &lt;a href=&quot;http://scottjehl.github.io/picturefill/&quot;&gt;&lt;code&gt;picturefill&lt;/code&gt;&lt;/a&gt; makes up ~55% (&lt;code&gt;47kb&lt;/code&gt; unminified/uncompressed) of the total JavaScript bundle – and we only use it for the logo!&lt;/p&gt;

&lt;p&gt;All of these “problems” minify and gzip away. Sure, sure. Except that minified &lt;code&gt;picturefill&lt;/code&gt; is still ~33% of the total bundle. So it’s still an issue. But the issue isn’t size alone, it’s that a majority of my codebase only does one tiny task and existed unquestioned&lt;sup id=&quot;fnref:micropicture&quot;&gt;&lt;a href=&quot;#fn:micropicture&quot; class=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;

&lt;p&gt;I am responsible for the code that goes into the machine, I do not want to shirk the responsibility of what comes out. Blind faith in tools to fix our problems is a risky choice. Maybe “risky” is the wrong word, but it certainly seems that we move the cost of our compromises to the client and we, speaking from personal experience, rarely inspect the results.&lt;/p&gt;
&lt;div class=&quot;footnotes&quot;&gt;
  &lt;ol&gt;
    &lt;li id=&quot;fn:micropicture&quot;&gt;
      &lt;p&gt;&lt;em&gt;Annnnd&lt;/em&gt; you know that ya boy is working on a ~&lt;code&gt;3kb&lt;/code&gt; &lt;a href=&quot;https://codepen.io/davatron5000/pen/MENprL?editors=0010&quot;&gt;sizes-less version of a &lt;code&gt;&amp;lt;picture&amp;gt;&lt;/code&gt; polyfill&lt;/a&gt; that minifies down to ~&lt;code&gt;1kb&lt;/code&gt;. Currently works in IE9-IE11. &lt;a href=&quot;#fnref:micropicture&quot; class=&quot;reversefootnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
</description>
        <pubDate>Thu, 26 Oct 2017 00:00:00 -0500</pubDate>
        <link>http://daverupert.com/2017/10/for-of-loops-are-bad/</link>
        <guid isPermaLink="true">http://daverupert.com/2017/10/for-of-loops-are-bad/</guid>
      </item>
    
      <item>
        <title>The Era of Newshammer</title>
        <description>&lt;p&gt;Welcome to the brand new Dave-Rupert-Dot-Com! It’s been about 5 years since I did any kind of redesign to my site and it feels good finally get this done. Allow me to give you a tour of some of the new features.&lt;/p&gt;

&lt;h2 id=&quot;meet-newshammer&quot;&gt;Meet Newshammer&lt;/h2&gt;

&lt;picture&gt;
  &lt;source srcset=&quot;/images/global/newshammer-48bit.webp&quot; type=&quot;image/webp&quot; /&gt;
  &lt;img srcset=&quot;/images/global/newshammer-48bit.png&quot; alt=&quot;Dave Newshammer&quot; /&gt;
&lt;/picture&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/davatron5000/status/895764031708987392&quot;&gt;Based on a dumb twitter joke&lt;/a&gt;, I commmissioned an awesome illustration from my friend and D&amp;amp;D cohort &lt;a href=&quot;http://kyleferrin.bigcartel.com/&quot;&gt;Kyle Ferrin&lt;/a&gt;. Kyle has an amazing illustration style and I couldn’t be happier displaying his work on my website. And once I got the illustration from Kyle I was like “Yes. This will basically be the whole site.”&lt;/p&gt;

&lt;p&gt;From a webperf perspective, Newshammer is a hefty &lt;code&gt;252kb&lt;/code&gt; transparent PNG, optimized down to a 48-bit color pallete. I even manually exported a WebP for the first time in my life (&lt;code&gt;185kb&lt;/code&gt;). I struggled with the number of kilobytes a bit so I cut a mobile version as well at &lt;code&gt;77kb&lt;/code&gt; and &lt;code&gt;68kb&lt;/code&gt; for the PNG and WebP respectively. I’m fairly happy with the results.&lt;/p&gt;

&lt;h2 id=&quot;css-variable-themes&quot;&gt;CSS Variable Themes!&lt;/h2&gt;

&lt;p&gt;My favorite feature of the site is that I finally have a good art direction and theming structure. Using CSS Custom Properties (“CSS Variables”), I can easily theme any part of the websites I want. A theme for my site looks something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:root.theme-minions {
    --bg: yellow;
    --text: black;
    --link: blue;
    --link-active: lightblue;
    --nav: blue;
    --headings: black;
    --border: blue;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With just ~7 lines of CSS I can completely change the look and feel of my site. I 🧡 this. If I need more flexibility (e.g. fonts?), it’s as simple as rolling a value up into a &lt;code&gt;:root&lt;/code&gt; variable and then overriding as necessary. Here are some of the default themes shipping in Dave Rupert 4.0: Newshammer…&lt;/p&gt;

&lt;p&gt;&lt;select onchange=&quot;document.documentElement.className = this.value;&quot; aria-label=&quot;Change Theme&quot;&gt;
    &lt;option value=&quot;&quot;&gt;Default&lt;/option&gt;
    &lt;option value=&quot;theme-blue&quot;&gt;Blue&lt;/option&gt;
    &lt;option value=&quot;theme-dark&quot;&gt;Dark&lt;/option&gt;
    &lt;option value=&quot;theme-gititgurl&quot;&gt;Git It Gurl&lt;/option&gt;
    &lt;option value=&quot;theme-millenial&quot;&gt;Millenial&lt;/option&gt;
&lt;/select&gt;&lt;/p&gt;

&lt;p&gt;Feel free to web inspect your own, take screenshots, and send them my way. On some of the themes, I even brought back some grunge background textures from &lt;a href=&quot;http://transparenttextures.com&quot;&gt;Transparent Textures&lt;/a&gt;. Mmm… dirty screens.&lt;/p&gt;

&lt;h3 id=&quot;css-variables-on-client-sites&quot;&gt;CSS Variables on Client Sites?&lt;/h3&gt;

&lt;p&gt;I have a lot to say about CSS Variables and theming but the &lt;code&gt;tl;dr&lt;/code&gt; is they’re great. But I don’t know yet if I’d recommend having this theming setup on client sites or pattern libraries.&lt;/p&gt;

&lt;p&gt;Where I really think CSS Variables would shine is inside a Web Component’s Shadow Root as opposed to the global &lt;code&gt;:root&lt;/code&gt;. I can explain this in another post, but theming could be done at a component level quite efficiently. &lt;code&gt;&amp;lt;button class=&quot;button button--primary&quot;&amp;gt;&lt;/code&gt; could become &lt;code&gt;&amp;lt;my-button theme=&quot;primary&quot;&amp;gt;&lt;/code&gt;. I think this would fundamentally change how we write CSS today. Component themes wouldn’t re-assign property values, themes would just modify variables.&lt;/p&gt;

&lt;p&gt;Bummer that HTML Imports got shitcanned tho.&lt;/p&gt;

&lt;h2 id=&quot;webfonts-are-back-baby&quot;&gt;Webfonts are back, baby!&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://daverupert.com/2016/03/spring-cleaning/&quot;&gt;I ditched webfonts for system fonts recently&lt;/a&gt; under the feeling that I wasn’t getting enough value for the kiloboytes and FOUT. It was fine but the 300 weight of Segoe for body text was nearly illegible on Chrome on Windows. I got a handful of complaints about that. So I made a change.&lt;/p&gt;

&lt;p&gt;Two weights of &lt;a href=&quot;https://fonts.google.com/specimen/Rubik&quot;&gt;Rubik&lt;/a&gt; do the majority of heavy lifting on the site now. Rubik is a squatty, thick, slightly-rounded sans-serif. It is a weird futuristic sans-serif and the “J” is super fucked up, but that’s maybe why I like it. In general, I find the typeface much more quirky and enjoyable to read than a system font.&lt;/p&gt;

&lt;p&gt;The other font is &lt;a href=&quot;https://fonts.google.com/specimen/Domine&quot;&gt;Domine&lt;/a&gt;, a charming serif, that is used exclusively for blockquotes on post templates.&lt;/p&gt;

&lt;p&gt;I haven’t settled on a font-loading strategy I love, so I’m just trying good ol’ fashioned &lt;code&gt;@font-face&lt;/code&gt; with &lt;code&gt;font-display: swap&lt;/code&gt;. This means Chrome will prefer a non-blocking FOUT experience. Edge defaults to a FOUT experience. Firefox has &lt;code&gt;font-display&lt;/code&gt; behind a flag. And iOS… render-blocked like a mofo. When, O Browser Gods, will you release me from this prison!?&lt;/p&gt;

&lt;p&gt;I almost went with 3 weights of Rubik but backed down. I’m hoping in the near future &lt;a href=&quot;http://www.axis-praxis.org/&quot;&gt;Variable Fonts&lt;/a&gt; make these sort of compromises irrelevant.&lt;/p&gt;

&lt;h2 id=&quot;beforeafter&quot;&gt;Before/After&lt;/h2&gt;

&lt;p&gt;I could bore you with some other CSS nerdery, but let’s look at some performance stats. I like to do this when I’m changing things up just to see how things are shaking down (All measurements &lt;a href=&quot;http://daverupert.com/2016/07/a-standard-system-of-measurements/&quot;&gt;on 3G Slow&lt;/a&gt;).&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Page&lt;/th&gt;
      &lt;th&gt;Start Render&lt;/th&gt;
      &lt;th&gt;Speed Index&lt;/th&gt;
      &lt;th&gt;DOMComplete&lt;/th&gt;
      &lt;th&gt;Load&lt;/th&gt;
      &lt;th&gt;Bytes In&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Home (Before)&lt;/td&gt;
      &lt;td&gt;1.079s&lt;/td&gt;
      &lt;td&gt;1079&lt;/td&gt;
      &lt;td&gt;3.498s&lt;/td&gt;
      &lt;td&gt;3.705s&lt;/td&gt;
      &lt;td&gt;69 KB&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Home (After)&lt;/td&gt;
      &lt;td&gt;1.177s&lt;/td&gt;
      &lt;td&gt;1783&lt;/td&gt;
      &lt;td&gt;5.530s&lt;/td&gt;
      &lt;td&gt;5.738s&lt;/td&gt;
      &lt;td&gt;314 KB&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Article (Before)&lt;/td&gt;
      &lt;td&gt;1.288s&lt;/td&gt;
      &lt;td&gt;1291&lt;/td&gt;
      &lt;td&gt;6.164s&lt;/td&gt;
      &lt;td&gt;8.108s&lt;/td&gt;
      &lt;td&gt;413 KB&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Article (After)&lt;/td&gt;
      &lt;td&gt;1.395s&lt;/td&gt;
      &lt;td&gt;1400&lt;/td&gt;
      &lt;td&gt;5.974s&lt;/td&gt;
      &lt;td&gt;7.651s&lt;/td&gt;
      &lt;td&gt;388 KB&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Oops. It appears I’ve quintupled the size of the homepage and nearly doubled load times. This is Newshammer and my webfonts’ fault. I’ve slimmed down my article template a bit so that’s good news.&lt;/p&gt;

&lt;p&gt;While this is not ideal, it’s a bit expected. My site was maybe artificially fast before. I tore it down to skin and bones. I’m also not doing any Critical CSS work this time around because theming doesn’t exactly mesh well with CSS-in-Head strategies. Some intentional decisions are slowing things down.&lt;/p&gt;

&lt;p&gt;And here’s the deal, I can iterate going forward. Launch day metrics aren’t always final. I can get better. Switching over to HTTP/2, Service Workers, and more are on my TODO list.&lt;/p&gt;

&lt;p&gt;But for now, let’s kick this thing off…&lt;/p&gt;
</description>
        <pubDate>Mon, 16 Oct 2017 00:00:00 -0500</pubDate>
        <link>http://daverupert.com/2017/10/newshammer-redesign/</link>
        <guid isPermaLink="true">http://daverupert.com/2017/10/newshammer-redesign/</guid>
      </item>
    
      <item>
        <title>A good science fiction story...</title>
        <description>&lt;blockquote&gt;
  &lt;p&gt;“A good science fiction story should be able to predict not the automobile but the traffic jam.” – Frederik Pohl&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;One of my favorite quotes on Science Fiction is from &lt;a href=&quot;https://en.wikipedia.org/wiki/Frederik_Pohl&quot;&gt;Frederik Pohl&lt;/a&gt;. Pohl got his start writing for the sci-fi pulp magazine &lt;a href=&quot;https://archive.org/details/amazingstoriesmagazine&quot;&gt;Amazing Stories&lt;/a&gt; in 1937 at the age of sixteen and went on to write books and become the editor of &lt;a href=&quot;https://archive.org/details/galaxymagazine&quot;&gt;Galaxy&lt;/a&gt; magazine.&lt;/p&gt;

&lt;p&gt;Pohl’s quote on “good science fiction” inspires me when thinking about technology. Good technologists (the ones manufacturing the science fiction) should be able to predict not just the technology, but the problems it creates. Thinking two steps ahead.&lt;/p&gt;

&lt;p&gt;Then yesterday…&lt;/p&gt;

&lt;blockquote class=&quot;twitter-tweet&quot; data-lang=&quot;en&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Y&amp;#39;all pile on us. You really think the issue doesn&amp;#39;t weigh on us? And you&amp;#39;re so dismissive of the Trust and Safety team. We&amp;#39;re all people.&lt;/p&gt;&amp;mdash; Biz Stone (@biz) &lt;a href=&quot;https://twitter.com/biz/status/914329739988541440?ref_src=twsrc%5Etfw&quot;&gt;October 1, 2017&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async=&quot;&quot; src=&quot;//platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;

&lt;p&gt;This is a tweet from Twitter co-founder Biz Stone replying to Mike Montiero about a public challenge to a debate. @Biz and @Jack set out to make a platform that millions of people use. They took in millions of dollars in VC funding to make that happen. They made millions of dollars when that company went public. But yet, they failed to anticipate the event when a world leader (ours) would begin inciting a nuclear war on their platform. And what astounds me most is that &lt;em&gt;they&lt;/em&gt;, the millionaire profiteers of this endless newscycle, feel victimized?&lt;/p&gt;

&lt;p&gt;Facebook too has failed to predict how their algorithm could have allowed foreign propaganda to influence our electoral process. They failed to see how their algorithm which feeds our confirmation biases might also radicalize us and balkanize politics. A failure to anticipate.&lt;/p&gt;

&lt;p&gt;There’s a running Twitter meme that we’re now living in an alternate timeline; the worst possible one. And to some extent I believe that we are. We’re living in the timeline that invented the car, but didn’t anticipate the traffic jam.&lt;/p&gt;

&lt;p&gt;I wanted to end with a similar quote from Ray Bradbury on the function of science fiction…&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;“The function of science fiction is not only to predict the future, but to prevent it.” – Ray Bradbury&lt;/p&gt;
&lt;/blockquote&gt;
</description>
        <pubDate>Mon, 02 Oct 2017 00:00:00 -0500</pubDate>
        <link>http://daverupert.com/2017/10/a-good-science-fiction-story/</link>
        <guid isPermaLink="true">http://daverupert.com/2017/10/a-good-science-fiction-story/</guid>
      </item>
    
      <item>
        <title>Dave Goes to the Microsoft Edge Web Summit 2017</title>
        <description>&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; class=&quot;conf-logo&quot; viewBox=&quot;0 0 163 67&quot; width=&quot;163&quot; height=&quot;67&quot; style=&quot;width: 66%; height: auto; margin-bottom: 1em;&quot;&gt;&lt;g fill=&quot;#167a3e&quot;&gt;&lt;path d=&quot;M 98 8 c -7.7 0 -14 6.3 -14 14 s 6.3 14 14 14 s 14 -6.3 14 -14 s -6.3 -14 -14 -14 Z m -2.5 18 L 94 27.5 L 88.5 22 l 5.5 -5.5 l 1.5 1.5 l -4 4 l 4 4 Z m 6.4 1.5 l -1.5 -1.5 l 4 -4 l -4 -4 l 1.5 -1.5 l 5.5 5.5 l -5.5 5.5 Z&quot; /&gt;&lt;path d=&quot;M 6.4 67 l 24.4 -30.3 l 11 9.4 L 52.1 36 l 14.7 15.2 l 12.5 -11.6 L 101.5 67 h 6.4 L 97.2 53.7 l 2.9 3.6 l 11.5 -13.4 l 10.6 6.4 l 15.3 -5.1 L 156.2 67 h 6.4 L 124 22 L 97 53.4 L 54 0 L 0 67 h 6.4 Z M 124 29.5 l 9.9 11.6 l -11.1 3.7 l -7.9 -4.7 l 9.1 -10.6 Z M 54 8 l 22.3 27.7 l -9.2 8.5 l -14.9 -15.4 l -10.6 10.5 l -7.6 -6.5 L 54 8 Z&quot; /&gt;&lt;/g&gt;&lt;/svg&gt;

&lt;p&gt;Last week I had the pleasure of attending the Microsoft Edge Web Summit. This was the 3rd Edge Web Summit continuing the new tradition of Microsoft being A LOT more open and transparent about their browser’s development.&lt;/p&gt;

&lt;p&gt;The Summit itself was very rewarding from a people perspective. I found myself surrounded by my Twitter feed and was able to finally meet and chat in-person with quite a few people I admire from their talks, writing, and open source contributions. Microsoft really is acquiring lots of great talent right now.&lt;/p&gt;

&lt;p&gt;As an Edge user, it was a pleasure to meet with and talk to the Edge developers. They heard my feedback and niche gripes, but my primary interest over the whole event was getting a sense of where Edge is going and what Edge developers think needs to be focused on and improved.&lt;/p&gt;

&lt;h2 id=&quot;six-must-see-talks-from-the-edge-web-summit&quot;&gt;Six Must-See Talks from the Edge Web Summit&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://channel9.msdn.com/Events/WebPlatformSummit/Microsoft-Edge-Web-Summit-2017&quot;&gt;All the talks from the Summit&lt;/a&gt; were great and informative but I wanted to highlight ~6 of the 14 talks I think are generally appealing and worth watching. I broke them up into two categories: How browsers work &amp;amp; New features and APIs.&lt;/p&gt;

&lt;h3 id=&quot;1-how-browsers-work&quot;&gt;1. How browsers work&lt;/h3&gt;

&lt;p&gt;I think most of us take for granted the hard work that goes into building a browser. These talks really illuminate the effort required to update Edge (and other browsers are doing similar things) while the software is being used by millions of people.&lt;/p&gt;

&lt;h4 id=&quot;decisions-decisions-decisions-how-we-plan-at-microsoft-edge-by-greg-whitworth&quot;&gt;“Decisions, Decisions, Decisions: How we plan at Microsoft Edge” by Greg Whitworth&lt;/h4&gt;

&lt;iframe src=&quot;https://channel9.msdn.com/Events/WebPlatformSummit/Microsoft-Edge-Web-Summit-2017/ES11/player&quot; width=&quot;960&quot; height=&quot;540&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;This was one of the last talks but I think it does a great job framing how features we developers crave get shipped in a browser. Every piece of software is a system of compromises. Limited time and resources means the Edge team must prioritize which features are most important. Greg Whitworth did a great job explaining how Edge uses feedback from &lt;a href=&quot;https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer&quot;&gt;UserVoice&lt;/a&gt; to inform their product decisions.&lt;/p&gt;

&lt;h4 id=&quot;building-a-safer-browser-four-guards-to-keep-users-safe-by-nathan-starr&quot;&gt;“Building a safer browser: Four guards to keep users safe” by Nathan Starr&lt;/h4&gt;

&lt;iframe src=&quot;https://channel9.msdn.com/Events/WebPlatformSummit/Microsoft-Edge-Web-Summit-2017/ES03/player&quot; width=&quot;960&quot; height=&quot;540&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;I’ve never heard a talk like this before. Nathan Starr explained in terms I could understand the mechanisms that Edge uses to secure the browser against Remote Code Execution. He walked through the “Four Guards” Edge has employed to cut off the three most common attack vectors.&lt;/p&gt;

&lt;h4 id=&quot;whats-new-and-beyond-for-the-microsoft-edge-devtools-by-jacob-rossi&quot;&gt;“What’s new and beyond for the Microsoft Edge DevTools” by Jacob Rossi&lt;/h4&gt;

&lt;iframe src=&quot;https://channel9.msdn.com/Events/WebPlatformSummit/Microsoft-Edge-Web-Summit-2017/ES10/player&quot; width=&quot;960&quot; height=&quot;540&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;Jacob Rossi opens his talk with a bit of honesty; Edge’s F12 Developer Tools are a bit behind. A lot of it is carryover code from the IE days and Edge has begun the process of untangling the legacy code and making it all faster.&lt;/p&gt;

&lt;h3 id=&quot;2-new-features-and-apis&quot;&gt;2. New Features and APIs&lt;/h3&gt;

&lt;p&gt;Based on my Twitter mentions, a lot of people still feel the Web is being held back by Edge. I understand the sentiment, but I also like to hear why people think that. Usually it’s some pet feature is missing. Edge is working hard to close the gap. And what I like about these talks is that they aren’t Chrome-only things or Apple-only things, throughout the conference it felt like Edge was talking about “Web Things”.&lt;/p&gt;

&lt;h4 id=&quot;css-grid-bringing-true-two-dimensional-layout-to-the-web-by-melanie-richards&quot;&gt;“CSS Grid: Bringing true two-dimensional layout to the web” by Melanie Richards&lt;/h4&gt;

&lt;iframe src=&quot;https://channel9.msdn.com/Events/WebPlatformSummit/Microsoft-Edge-Web-Summit-2017/ES08/player&quot; width=&quot;960&quot; height=&quot;540&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;This was a fantastic talk. I’ve heard more than a few CSS Grid talks, I use Grid daily, and I still learned a lot. It’s maybe the best “How-to CSS Grid” talk I’ve ever heard and Melanie Richards knows what she’s talking about because she helped build the exemplary &lt;a href=&quot;https://summit.microsoftedge.com&quot;&gt;summit.microsoftedge.com&lt;/a&gt; site.&lt;/p&gt;

&lt;h4 id=&quot;pay-the-web-forward-making-payments-simpler-on-the-modern-web-by-molly-dalton&quot;&gt;“Pay the Web Forward: Making payments simpler on the Modern Web” by Molly Dalton&lt;/h4&gt;

&lt;iframe src=&quot;https://channel9.msdn.com/Events/WebPlatformSummit/Microsoft-Edge-Web-Summit-2017/ES09/player&quot; width=&quot;960&quot; height=&quot;540&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;Molly Dalton opened her talk illustrating how web payment capture forms have basically been the same ~14.5 inputs for the last 20 years. It’s time to modernize this. The talk contains a nice walkthru examples showing how the Payment API can revamp the checkout flow.&lt;/p&gt;

&lt;h4 id=&quot;mixed-reality-in-microsoft-edge-with-webvr-with-nell-waliczek-and-lewis-weaver&quot;&gt;“Mixed Reality in Microsoft Edge with WebVR” with Nell Waliczek and Lewis Weaver&lt;/h4&gt;

&lt;iframe src=&quot;https://channel9.msdn.com/Events/WebPlatformSummit/Microsoft-Edge-Web-Summit-2017/ES12/player&quot; width=&quot;960&quot; height=&quot;540&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;WebVR probably isn’t on everyone’s radar, but Nell Waliczek and Lewis Weaver’s talk showed how the Promise-based WebVR API works. Microsoft and its OEM partners have some intriguing “Mixed Reality” devices on the horizon. I get excited about WebVR (over all the other VRs) and I’ve built some WebVR experiences with &lt;a href=&quot;https://aframe.io&quot;&gt;Aframe&lt;/a&gt;. I’d love to get my hands on one of these headsets and controllers.&lt;/p&gt;

&lt;h2 id=&quot;a-summit-summary&quot;&gt;A Summit Summary&lt;/h2&gt;

&lt;p&gt;The common thread between all of my conversations with Edge developers was that the decision to break away from IE was a great one. &lt;a href=&quot;https://channel9.msdn.com/Events/WebPlatformSummit/Microsoft-Edge-Web-Summit-2017/ES14&quot;&gt;Edge is being rebuilt from the ground up&lt;/a&gt;; a new layout system, a new networking system, a new DOM tree parser, a new JS engine, and more. Are all coming together to unblock the main UI thread resulting in a better, faster, and more secure browser. You really get a sense that forking Internet Explorer was the best thing to happen for Edge and its users. A risky, monumental re-platforming project that has paid off.&lt;/p&gt;

&lt;p&gt;I’m also very encouraged by Microsoft’s support of Progressive Web Apps. Service Workers will be turned on by default in Edge &lt;del&gt;16&lt;/del&gt;&lt;ins&gt;17 (behind a flag in 16)&lt;/ins&gt;. Microsoft has plans to scour the web and ingest PWAs into its Windows Store. Microsoft has created tools like &lt;a href=&quot;https://webmanife.st&quot;&gt;ManifestStation&lt;/a&gt; and &lt;a href=&quot;http://www.pwabuilder.com/&quot;&gt;PWA Builder&lt;/a&gt; which give you a jump start on you Manifest and your Service Worker. You can even get an &lt;code&gt;.appx&lt;/code&gt; bundle (a “Hosted Web App”) that you can deploy to the Windows Store right now if you want.&lt;/p&gt;

&lt;p&gt;Edge and Windows embracing PWAs is part of &lt;a href=&quot;http://daverupert.com/tag/davegoeswindows&quot;&gt;the reason I stuck with Windows&lt;/a&gt; and I’m excited to see how PWAs on Windows plays out in the near near future.&lt;/p&gt;
</description>
        <pubDate>Sat, 23 Sep 2017 00:00:00 -0500</pubDate>
        <link>http://daverupert.com/2017/09/dave-goes-to-the-microsoft-edge-web-summit-2017/</link>
        <guid isPermaLink="true">http://daverupert.com/2017/09/dave-goes-to-the-microsoft-edge-web-summit-2017/</guid>
      </item>
    
      <item>
        <title>Breaking the&amp;nbsp;Grid</title>
        <description>&lt;p&gt;As a Front-End developer nothing bothers me more than seeing an unexpected horizontal scrollbar on a website. While building out a checkout layout with CSS Grid I was surprised to find something mysterious was breaking the container. I thought Grid sort of auto-solved sizing.&lt;/p&gt;

&lt;p&gt;Eventually I found two ways to break CSS Grid. As it would happen, I was doing both in the same layout. 🤦‍&lt;/p&gt;

&lt;h2 id=&quot;1-overflow-x-elements-break-the-grid&quot;&gt;#1: Overflow-x Elements break the Grid&lt;/h2&gt;

&lt;p&gt;We had a subnavigation pattern in our checkout that would &lt;code&gt;overflow-x&lt;/code&gt; to reveal more payment options. Even with &lt;code&gt;overflow-x: auto&lt;/code&gt; applied the Grid Item was being sized to the &lt;code&gt;scrollWidth&lt;/code&gt; of the subnavigation. Turns out any &lt;code&gt;overflow-x&lt;/code&gt; element like a &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt; block or a &lt;a href=&quot;https://css-tricks.com/responsive-data-tables/&quot;&gt;responsive table&lt;/a&gt; solution would break the Grid. Here’s a reduced test case:&lt;/p&gt;

&lt;p data-height=&quot;300&quot; data-theme-id=&quot;11781&quot; data-slug-hash=&quot;BdqOzE&quot; data-default-tab=&quot;result&quot; data-user=&quot;davatron5000&quot; data-embed-version=&quot;2&quot; data-pen-title=&quot;Overflow-x Elements Inside CSS Grid (bug? behavior?)&quot; class=&quot;codepen&quot;&gt;See the Pen &lt;a href=&quot;https://codepen.io/davatron5000/pen/BdqOzE/&quot;&gt;Overflow-x Elements Inside CSS Grid (bug? behavior?)&lt;/a&gt; by Dave Rupert (&lt;a href=&quot;https://codepen.io/davatron5000&quot;&gt;@davatron5000&lt;/a&gt;) on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Typically &lt;code&gt;overflow-x: auto&lt;/code&gt; fixes horizontally overflowing elements. But nope, not here. The next escalation is to wrap the element and try a bunch of &lt;code&gt;overflow: hidden&lt;/code&gt; tricks to force the layout to obey. Still nope.&lt;/p&gt;

&lt;p&gt;The reason this is happening is that Grid Items have a default &lt;code&gt;min-width: auto&lt;/code&gt; and will auto-size to the content inside. It sets its &lt;code&gt;min-width&lt;/code&gt; based on the width of overflowing block. So to fix an deeply nested overflowing child, you counter-intuitively ignore the parent element and go all the way up the DOM tree to the Grid Item and zero-out the &lt;code&gt;min-width&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;.grid &amp;gt; * { min-width: 0; }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will result in Grid Items with overflowing content to be sized correctly. But not always…&lt;/p&gt;

&lt;h2 id=&quot;2-form-controls-break-the-grid&quot;&gt;#2: Form Controls break the Grid&lt;/h2&gt;

&lt;p&gt;Our layout was also using Grid to put form inputs side-by-side. I &lt;a href=&quot;https://codepen.io/davatron5000/debug/dzgJzj/&quot;&gt;created a reduced test case&lt;/a&gt; of different input types in a CodePen to isolate the problem. If you squeeze the window until you get a horizontal scrollbar ~380px you’ll see inputs spilling out of the grid track.&lt;/p&gt;

&lt;p data-height=&quot;300&quot; data-theme-id=&quot;11781&quot; data-slug-hash=&quot;dzgJzj&quot; data-default-tab=&quot;css,result&quot; data-user=&quot;davatron5000&quot; data-embed-version=&quot;2&quot; data-pen-title=&quot;CSS Grid PRBLMZ 😢😓😭&quot; class=&quot;codepen&quot;&gt;See the Pen &lt;a href=&quot;https://codepen.io/davatron5000/pen/dzgJzj/&quot;&gt;CSS Grid PRBLMZ 😢😓😭&lt;/a&gt; by Dave Rupert (&lt;a href=&quot;https://codepen.io/davatron5000&quot;&gt;@davatron5000&lt;/a&gt;) on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Typically to fix inputs like this you’d apply &lt;code&gt;max-width: 100%&lt;/code&gt;, but while that mostly fixes Chrome and Safari some elements and elements in Firefox and Edge still break out of the grid track.&lt;/p&gt;

&lt;p&gt;Why is this happening? Because &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; elements and their ilk (&lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;progress&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;video&amp;gt;&lt;/code&gt;) have the potential of being something called &lt;strong&gt;Replaced Elements&lt;/strong&gt;.&lt;/p&gt;

&lt;h3 id=&quot;what-the-heck-are-replaced-elements&quot;&gt;What the heck are Replaced Elements?&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/CSS/Replaced_element&quot;&gt;According to MDN&lt;/a&gt;, a replaced element is an element whose representation is outside the scope of CSS. These are situations where the browser takes your markup and injects a “Shadow DOM-esque” element. &lt;code&gt;&amp;lt;video&amp;gt;&lt;/code&gt; is a great example of this, but lots of form controls also fall under this umbrella.&lt;/p&gt;

&lt;p&gt;Replaced Elements exist in somewhat of a &lt;a href=&quot;https://drafts.csswg.org/css2/conform.html#replaced-element&quot;&gt;specification no man’s land&lt;/a&gt;. The styling and rendering rules around them aren’t clearly defined, just that they “often have intrinsic dimensions”. This results in browsers coming to different conclusions for the default appearance of certain elements or whether Replaced Elements are used at all. You can see in this screenshot how browsers use Replaced Elements differently and their varying sizes.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2017/replacedelements.png&quot; alt=&quot;Screenshot of replaced elements rendering in Chrome, Firefox and Edge&quot; /&gt;
&lt;/figure&gt;

&lt;p&gt;For our situation, some &lt;code&gt;input&lt;/code&gt; elements have a phantom “intrinsic size” applied by the browser. It doesn’t show up as a browser-defined style in the Styles tab nor the Calculated Styles tab, but is a &lt;code&gt;min-width&lt;/code&gt; of around ~180px for a standard &lt;code&gt;&amp;lt;input type=&quot;text&quot;&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In order to fix elements spilling out of the grid track in a cross-browser way, we have to override this intrinsic sizing of replaced elements.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* Apply max-width to Replaced Elements and Form controls */
img, video, audio, canvas, input,
select, button, progress { max-width: 100%; }

/* Make file and submit inputs text-wrap */
input[type=&quot;file&quot;],
input[type=&quot;submit&quot;] { white-space: pre-wrap; }

/* Fix Progress and Range Inputs */
progress,
input[type=&quot;range&quot;] { width: 100%; }

/* Fix Number Inputs in Firefox */
@supports (--moz-appearance: none) {
  input[type=&quot;number&quot;] { width: 100%; }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;There’s a side effect here where &lt;code&gt;progress&lt;/code&gt;, &lt;code&gt;range&lt;/code&gt;, and &lt;code&gt;number&lt;/code&gt; now will always occupy 100% of the grid track. This could be overriden or customized.&lt;/p&gt;

&lt;h2 id=&quot;are-these-grid-implementation-bugs-not-exactly&quot;&gt;Are these Grid implementation bugs? Not exactly.&lt;/h2&gt;

&lt;p&gt;This behavior –&lt;a href=&quot;https://stackoverflow.com/questions/43311943/prevent-grid-items-from-stretching-in-css-grid-layout&quot;&gt;as someone on StackOverflow pointed out&lt;/a&gt;– is actually to-spec. Grid is inheriting Flexbox’s behavior around &lt;code&gt;min-width: auto&lt;/code&gt; and Replaced Elements have &lt;code&gt;min-width&lt;/code&gt; in their intrinsic dimensions. So it’s not a bug per se.&lt;/p&gt;

&lt;p&gt;However, for nearly every one of my layouts, this will result in me using a utility class I’ll apply to mis-behaving Grid Items. In the interest of staying on-brand, I’m calling it “Fit Grid”.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/*
 _______  ___   _______    _______  ______    ___   ______  
|       ||   | |       |  |       ||    _ |  |   | |      | 
|    ___||   | |_     _|  |    ___||   | ||  |   | |  _    |
|   |___ |   |   |   |    |   | __ |   |_||_ |   | | | |   |
|    ___||   |   |   |    |   ||  ||    __  ||   | | |_|   |
|   |    |   |   |   |    |   |_| ||   |  | ||   | |       |
|___|    |___|   |___|    |_______||___|  |_||___| |______| 
by Dave Rupert
Read More: https://daverupert.com/2017/09/breaking-the-grid/
*/

/* 
 * Remove `min-width: auto` from Grid Items
 * Fixes overflow-x items.
 */
.fit-grid &amp;gt; * { min-width: 0; }

/* Apply max-width to Replaced Elements and Form controls */
.fit-grid img,
.fit-grid video,
.fit-grid audio,
.fit-grid canvas,
.fit-grid input,
.fit-grid select,
.fit-grid button,
.fit-grid progress { max-width: 100%; }

/* Make file and submit inputs text-wrap */
.fit-grid input[type=&quot;file&quot;],
.fit-grid input[type=&quot;submit&quot;] { white-space: pre-wrap; }

/* Fix Progress and Range Inputs */
.fit-grid progress,
.fit-grid input[type=&quot;range&quot;] { width: 100%; }

/* Fix Number Inputs in Firefox */
@supports (--moz-appearance: none) {
  .fit-grid input[type=&quot;number&quot;] { width: 100%; }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Heavy-lifting layout grids need to be agnostic of the content inside of them and tolerant to support a wide variety of scenarios. I’ll likely need to include this on every project to make Grid Items as tolerant as possible. While not a bug, I can see this as being &lt;strong&gt;“Clearfix 2.0” territory&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If it were up to me, I think Replaced Elements should always obey and fit inside the Grid Track. I’d love it if browsers could come together on this. The only other question I have is whether or not all Form Controls should occupy the entire grid track like &lt;code&gt;progress&lt;/code&gt;, &lt;code&gt;range&lt;/code&gt;, and &lt;code&gt;number&lt;/code&gt; require. The solution is &lt;code&gt;input, select { width: 100% }&lt;/code&gt;, but my gut is telling me not everyone would want that.&lt;/p&gt;

&lt;p&gt;If you have improvements, I’d love to hear it them and I’ll put this up on GitHub, but please test it in every browser before claiming a fix. Thanks, d00dz.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks to Greg Whitworth from Microsoft Edge for helping me debug and understanding Replaced Elements a lot more.&lt;/em&gt;&lt;/p&gt;
</description>
        <pubDate>Tue, 05 Sep 2017 00:00:00 -0500</pubDate>
        <link>http://daverupert.com/2017/09/breaking-the-grid/</link>
        <guid isPermaLink="true">http://daverupert.com/2017/09/breaking-the-grid/</guid>
      </item>
    
  </channel>
</rss>

