Search
Solved With CSS! Dropdown Menus
1.5.2018
A common UI pattern that we see on the web are dropdown menus. They’re used to display related information in pieces, without overwhelming the user with buttons, text, and options. Somewhere that we see these a lot is inside of headers or navigation areas on websites.
Let’s see if we can make...
Change Python Version
1.5.2018
Python plays a major role at Mozilla; much of our website backends and tooling are written in the powerful language. Want to build Firefox? You’ll need to make sure you have the proper Python version, which I recently found out had been upgraded. Despite installing and verifying I had...
Animating Progress
30.4.2018
Jonathan Snook on the complexity of animating the <progress> element. If you’re unfamiliar, that’s the element that spits out a bar chart-like visual that indicates a position between two values:
This example has custom styles, but you get the point.
Jonathan's post shows off a method...
Finger-friendly numerical inputs with `inputmode`
30.4.2018
Forms are often a nightmare on mobile. We can make the process as pain-free as possible by reacting to context. Input fields that expect numerical values should have a numerical UI. Bringing up a number keyboard on small screens is easy on most platforms — just use a <input...
Practical Jokes in the Browser
28.4.2018
I know April Fool’s Day is at the beginning of this month, but hey, now you’ve got a year to prepare. Not to mention a gool ol’ practical joke can be done anytime.
Fair warning on this stuff… you gotta be tasteful. Putting someone’s stapler in the jello is pretty hilarious unless it’s somehow...
CSS Blocks
27.4.2018
A new entry into the CSS-in-JS landscape! Looks like the idea is that you write an individual CSS file for every component. You have to work in components, that's how the whole thing works. In the same isle as styled-components, css-modules, and glamorous.
Then you write :scope { } which is...
Radial Gradient Recipes
26.4.2018
Radial gradients are pretty dang cool. It's amazing we can paint the background of an element with them so easily. Easily is a relative term though. It's certainly easier than needing to create a graphic in third-party software to use as the background, and the syntax is highly learnable. But it's...
Level Up Your JavaScript Error Monitoring
26.4.2018
(This is a sponsored post.)
Automatically detect and diagnose JavaScript errors impacting your users with Bugsnag without changing your code or adding try/catch blocks. Get comprehensive diagnostic reports, know immediately which errors are worth fixing, and debug in a fraction of the time compared...
Understanding React `setState`
25.4.2018
React components can, and often do, have state. State can be anything, but think of things like whether a user is logged in or not and displaying the correct username based on which account is active. Or an array of blog posts. Or if a modal is open or not and which tab within it is active.
React...
Reset File Changes with git
25.4.2018
There are many different philosophies when it comes to code review but mine is fairly simple: I like receiving early “work in progress” patches, I like to be positive in my code review messages, and if a patch is 90% there, I like to finish the patch myself so the project...
Grid to Flex
24.4.2018
Una Kravets shows how to make layouts in CSS Grid with flexbox fallbacks for browsers that don’t support those grid properties just yet. Una writes:
CSS grid is AMAZING! However, if you need to support users of IE11 and below, or Edge 15 and below, grid won't really work as you expect...This site...
JAMstack Comments
24.4.2018
JAMstack sites are often seen as being static. A more accurate mental model for them would be that they are sites which have the ability to be hosted statically. The difference might seem semantic, but thanks to the rise of many tools and services which simplify running a build and deploying...
DDoS Protection by Incapsula (Sponsored)
24.4.2018
DDoS protection is an incredibly important protection for sites that require dependability, regardless of the service your site provides. Whether your online product or service is for managing money, buying or selling crypto, or simply sharing your tech nerdery (like this blog), there’s...
Server-Side Visualization With Nightmare
24.4.2018
This is an extract from chapter 11 of Ashley Davis’s book Data Wrangling with JavaScript now available on the Manning Early Access Program. I absolutely love this idea as there is so much data visualization stuff on the web that relies on fully functioning client side JavaScript and potentially...
Native-Like Animations for Page Transitions on the Web
23.4.2018
Some of the most inspiring examples I’ve seen of front-end development have involved some sort of page transitions that look slick like they do in mobile apps. However, even though the imagination for these types of interactions seem to abound, their presence on actual sites that I visit do not....
Script & Style Show: Episode 8: Conferences
22.4.2018
On this episode: David turns carmudgeon when it comes to conferences. The crew talks about different conferences, pitfalls of going to a conference, and most importantly, how to be successful at a conference. Enjoy!
The post Script & Style Show: Episode 8: Conferences appeared first...
Choosing a Responsive Email Framework: MJML vs. Foundation for Emails
20.4.2018
Implementing responsive email design can be a bit of a drag. Building responsive emails isn’t simple at all, it is like taking a time machine back to 2001 when we were all coding website layouts in tables using Dreamweaver and Fireworks.
But there's hope! We have tools available that can make...
What are Higher-Order Components in React?
19.4.2018
If you have been in the React ecosystem for a while, there is a possibility that you have heard about Higher Order Components. Let’s look at a simple implementation while also trying to explain the core idea. From here you should get a good idea of how they work and even put them to use.
Why...
Scroll to the Future
19.4.2018
This is an interesting read on the current state of scrollbars and how to control their behavior across operating systems and browsers. The post also highlights a bunch of stuff I didn’t know about, like Element.scrollIntoView() and the scroll-behavior CSS property.
My favorite part of all though?...
Kinsta
19.4.2018
(This is a sponsored post.)
Huge thanks to Kinsta for sponsoring CSS-Tricks this week! We're big fans of WordPress around here, and know some of you out there are too. So this might come of interest: Kinsta is WordPress hosting that runs on Google Cloud Platform. And in fact, it's officially...