Web Development

Web Development Latest News

css-tricks.com

Considerations for Creating a Card Component

Even a simple Card component can be tricky to design an API around. What abstraction are you providing? How much control do you want to give? If you make it too flexible, you aren’t providing much value. If you make it to rigid, you also aren’t providing much value.

css-tricks.com

Unfortunately, clip-path: path() is Still a No-Go

I was extremely excited when I first heard that clip-path: path() was coming to Firefox. Just imagine being able to easily code a breathing box like the one below with just one HTML element and very little CSS without needing SVG or a huge list of points inside the polygon function! Chris was excited about …

css-tricks.com

Selectors Explained

Have you ever found yourself either writing a CSS selector that winds up looking confusing as heck, or seen one while reading through someone’s code? That happened to me the other day. Here’s what I wrote: At the end of it, I honestly couldn’t even explain what it does to myself. LOL, that probably means …

css-tricks.com

HTML: The Inaccessible Parts

<input type=”number”>, <input type=”date”>, <input type=”search”>, <select multiple>, <progress>, <meter>, <dialog>, <details><summary>, <video>, <div onclick>, <div aria-label>, <a href><div>Block Links</div></a>, aria-controls, role=”tablist” 😬😬😬😬😬😬😬😬😬😬😬😬

css-tricks.com

A Follow-Up to PHP Templating

Not long ago, I posted about PHP templating in just PHP (which is basically HEREDOC syntax). I’m literally using that technique for some super basic templating I needed to do on this very WordPress site. The main pushback was that this kind of thing can be an XSS vulnerability. In my case, it’s not, because …

css-tricks.com

Where to Learn WordPress Theme Development

Over a decade ago, I did a little three-part video series on Designing for WordPress. Then I did other series with the same spirit, like videocasting the whole v10 redesign, a friend’s website, and even writing a book. Those are getting a little long in the tooth though. You might still learn from watching them …

css-tricks.com

Data-driven Jamstack with Sourcebit

Think of building sites with Gatsby as an hourglass shape. Gatsby itself is right in the middle. The wide funnel at the top represents the fact that Gatsby can take in data from all sorts of sources. The data could be in markdown files, from a headless CMS or some other API, from a hosted …

css-tricks.com

When CSS Blocks

Tim Kadlec: One particular pattern for loading non-critical CSS I’ve seen is the preload/polyfill pattern. With this approach, you load any stylesheets as preloads instead, and then use their onload events to change them back to a stylesheet once the browser has them ready. So you’re trying to make your stylesheet more async, but it causes two …

css-tricks.com

Instant GraphQL Backend with Fine-grained Security Using FaunaDB

GraphQL is becoming popular and developers are constantly looking for frameworks that make it easy to set up a fast, secure and scalable GraphQL API. In this article, we will learn how to create a scalable and fast GraphQL API with authentication and fine-grained data-access control (authorization). As an example, we’ll build an API with …

css-tricks.com

Animated Matryoshka Dolls in CSS

Here’s a fun one. How might we create a set of those cool Matryoshka dolls where they nest inside one another… but in CSS? I toyed with this idea in my head for a little while. Then, I saw a tweet from CSS-Tricks and the article image had the dolls. I took that as a …

css-tricks.com

Chameleonic Header

Nice demo from Sebastiano Guerriero. When a fixed-position header moves from overlapping differently-colored backgrounds, the colors flop out to be appropriate for that background. Sebastiano’s technique is very clever, involving multiple copies of the header within each section (where the copies are hidden from screenreaders) which are all positioned on top of each other and …

css-tricks.com

Weaving a Line Through Text in CSS

Earlier this year, I came across this demo by Florin Pop, which makes a line go either over or under the letters of a single line heading. I thought this was a cool idea, but there were a few little things about the implementation I felt I could simplify and improve at the same time.

css-tricks.com

Pages for Likes

I posted about parsing an RSS feed in JavaScript the other day. I also posted about my RSS setup talking about how Feedbin is at the heart of it. Dave discovered that Feedbin can also produce an RSS feed for all your likes. Likes is a feature of Feedbin, and fortunately also NetNewsWire, which syncs …

css-tricks.com

Gutenberging

It’s been over a year since the big WordPress launch of Gutenberg, the new editor. It seems to me most of the controversy around it has died down. There has been enough time that the UX and accessibility of it have improved, and people are seeing the potential a lot more clearly. There ain’t no …

css-tricks.com

wpaudit.site

A big checklist of things you could/should be doing to make your website the best it can be. 80% of which is a good idea for any website, not just a WordPress website. I’m linking to it because I like how plain language it is, and because it’s a good example of how giving something …

css-tricks.com

Fixed Headers and Jump Links? The Solution is scroll-margin-top

The problem: you click a jump link like <a href=”#header-3″>Jump</a> which links to something like <h3 id=”header-3″>Header</h3>. That’s totally fine, until you have a position: fixed; header at the top of the page obscuring the header you’re trying to link to! Fixed headers have a nasty habit of hiding the element you’re trying to link …

css-tricks.com

Inspiring high school students with HTML and CSS

Here’s a heartwarming post from Stephanie Stimac on her experience teaching kids the very basics of web development: … the response from that class of high school students delighted me and grounded me in a way I haven’t experienced before. What I view as a simple code was absolute magic to them. And for all …

css-tricks.com

iOS 13 Design Guidelines, Templates, and Downloads

Erik Kennedy wrote up a bunch of design advice for designing for the iPhone. Like Apple’s Human Interface Guidelines, only illustrated and readable, says Erik. This is mostly for native iOS apps kinda stuff, but it makes me wonder how much of this is expected when doing a mobile Progressive Web App. On one hand, …

css-tricks.com

Animate SVG Path Changes in CSS

Every once in a while I’m motivated to attempt to draw some shapes with <path>, the all-powerful drawing syntax of SVG. I only understand a fragment of what it all can do, but I know enough to be dangerous. All the straight-line syntax commands (like L) are pretty straightforward and I find the curved Q …

css-tricks.com

A Guide to Console Commands

The developer’s debugging console has been available in one form or another in web browsers for many years. Starting out as a means for errors to be reported to the developer, its capabilities have increased in many ways; such as automatically logging information like network requests, network responses, security errors or warnings. There is also …

css-tricks.com

Add Background Colors to SVGs Using the “rect” Element

The advantages of using SVGs in web development are well known. SVGs are small in size, can be made quite accessible, are scalable while maintaining their quality, and can be animated. Still, there is a learning curve. Things, like the syntax of SVG, can be a little tricky and having to hand-alter SVG code sometimes …

css-tricks.com

Seen by Indeed

Are you looking for a tech job where you clock in, or for a career where you’ll be seen? Seen by Indeed is a matching service for software engineers, product managers and other tech pros that sorts through thousands of companies — like Twilio, Overstock, VRBO, and PayPal — and matches tech talent like you to …

css-tricks.com

Footnote Characters

There are special superset number characters that are sometimes perfect for footnotes. Here they are: ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ I generally prefer to superscript the number myself, like: