Select Page

Category: Article

Menus with “Dynamic Hit Areas”

Flyout menus! The second you need to implement a menu that uses a hover event to display more menu items, you’re in tricky territory. For one, they should work with clicks and taps, too. Without that, you’ve broken the menu for anyone without a mouse. That doesn’t mean you can’t also use :hover. When you use a hover state to reveal more content, that means an un-hovering state needs to hide them. Therein lies the problem. The problem is that if a submenu pops out somewhere on hover, getting your mouse over to it might involve moving it along...

Read More

Tips for rolling your own lazy loading

You may have heard (or even issued the call) that “we can just use lazy loading!” when looking for a way to slim down a particularly heavy web page. Lazy loading is a popular technique for gradually requesting images as they come into view, rather than all at once after the HTML of the page has been parsed. It can reduce the initial page weight, and help us hit our performance budgets by requesting images when they’re needed. It can be effective. But it also comes with some baggage of its own. We’ll get to that! In fact, Rahul...

Read More

The (Developer’s) Growth Model

I really like the post “The Designer’s Growth Model” by Dennis Hambeukers. Dennis just invented this model, but it’s based on some existing ideas and it all rings true for me. Let me try to summarize the five stages as he lays them out for designers. Producers: You learn how to design. You learn fundamentals, you practice, you get good at doing design work and producing beautiful functional things. Then you have this “crisis” moment before the next stage where you find you can’t do enough work on your own and that you need to be able to scale...

Read More

Which CSS IS AWESOME makes the most sense if you don’t know CSS well?

Peter-Paul posted this question: Which of the examples in the image do you consider correct? If you know CSS well, don’t reply, just retweet. If you don’t know CSS too well, please reply to the poll in the next tweet. pic.twitter.com/4bgnf9Wdkc — ppk 🇪🇺 (@ppk) June 17, 2019 Note the interesting caveat: only vote in the poll if you don’t know CSS well. The winning answer was D! You gotta wonder if the result would have been different if the request for non-CSS experts wasn’t there. I like to think I know CSS OK, so I didn’t vote. My brain goes like this: I think he’s asking “by default,” so the answer may assume there’s no other CSS doing anything to that text. I wish I knew why the box was that particular width, but I guess I’ll just assume it’s a set width. It’s not B because ellipsis stuff requires extra stuff, and doesn’t work on multiple lines like that — unless we’re talking line clamping, which is even weirder. It’s not C because that requires hiding overflow which is never really a default — that is, except off the top and left of the browser window, I guess. Or in an iframe. It’s not D because words just don’t break like that unless you do pretty specific stuff. A actually makes decent sense. It’s weird to look...

Read More

Three Predictions From the State of CSS 2019 Survey

Running a developer survey like the State of CSS is a multi-stage process. First, you need to collect the data. Then, you process it into a usable shape. Finally, you come up with nifty ways to visualize it and release it to the world. But then, once the dust settles and the traffic dies down comes my favorite part: actually thinking about the data. By taking a deeper look at our data, as well as observing how the community discussed our findings, three unexpected trends ended up coming into focus. But first, some background for those not already familiar...

Read More

Spam Detection APIs

I was trying to research the landscape of these the other day — And by research, I mean light Googling and asking on Twitter. Weirdly, very little comes to mind when thinking about spam detection APIs. I mean some kind of URL endpoint, paid or not, where you can hit it with a block of text and whatever metadata it wants and it’ll tell you if it’s spam or not. Seems like something an absolute buttload of the internet could use and something companies of any size could monetize or offer free to show off their smart computer machines....

Read More

Reduced Motion Picture Technique, Take Two

Did you see that neat technique for using the element with to serve an animated image (or not) based on a prefers-reduced-motion media query? After we shared that in our newsletter, we got an interesting reply from Michael Gale: What about folks who love their animated GIFs, but just didn’t want the UI to be zooming all over the place? Are they now forced to make a choice between content and UI? I thought that was a pretty interesting question. Also, whenever I see these days, my brain is triggered into WELL WHAT ABOUT MP4?! territory, as I’ve been...

Read More

How to Increase Your Page Size by 1,500% with webpack and Vue

Disclaimer: This article is mostly satire. I do not think that I am better than you because I once wrote some TypeScript nor do I think that it’s a good thing for us to make web pages bigger. Feel free to misrepresent these views to maximize clicks. You know, there are a lot of articles out there telling you how to make your page smaller: optimize your images, remove extraneous CSS rules, re-write the whole thing in Dreamweaver using framesets. Look,  Walmart just reduced their page size by some numbers, give or take. JavaScript housekeeping: 🗑️ Remove old &...

Read More

Managing State in React using Unstated-Next

In a previous post, we saw how to manage state using Unstated. As you might recall, Unstated uses React’s built-in setState to allow you create components that can consume state by subscribing to a provider — like the React’s Context API. Well, we’re going to build off that last post by looking at Unstated Next, a library that author Jamie Kyle identifies as the “spiritual successor” to his Unstated project. Unstated Next provides both React Hooks and the Context API for managing state. Unstated was a minimal abstraction to the idea of React Hooks before they were a fully-fledged...

Read More
www.000webhost.com