Your Web News in One Place

Articles by CSS Tricks from February 2020

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
< Return to CSS Tricks details.
09:18 pm GMT - Fri, February 28, 2020
CSS Tricks 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 si...
03:26 pm GMT - Fri, February 28, 2020
CSS Tricks How to Customize the WooCommerce Cart Page on a WordPress Site
A standard e-commerce site has a few common pages. There are product pages, shop pages that list products, and lets not forget pages for the user account, checkout flow and cart.WooCommerce makes it a...
03:25 pm GMT - Fri, February 28, 2020
CSS Tricks 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 ev...
01:57 pm GMT - Fri, February 28, 2020
CSS Tricks 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. T...
11:02 pm GMT - Thu, February 27, 2020
CSS Tricks Why is CSS Frustrating?
Heres a great thread by Kevin Powell that's making the rounds. He believes so many folks see CSS as a frustrating and annoying language:That's just as unintuitive as JS starting to count at 0, but...
11:02 pm GMT - Thu, February 27, 2020
CSS Tricks When CSS Blocks
Tim Kadlec:One particular pattern [for loading non-critical CSS] Ive seen is the preload/polyfill pattern. With this approach, you load any stylesheets as preloads instead, and then use their onl...
05:31 pm GMT - Thu, February 27, 2020
CSS Tricks 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 sca...
03:23 pm GMT - Thu, February 27, 2020
CSS Tricks Animated Matryoshka Dolls in CSS
Heres 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 fro...
10:10 pm GMT - Wed, February 26, 2020
CSS Tricks Lets Say You Were Going to Write a Blog Post About Dark Mode
This is not that blog post. I'm saying let's say you were. This is not a knock any other blog posts out there about Dark Mode. There are lots of good ones, and I'm a fan of any information-sharing blo...
10:10 pm GMT - Wed, February 26, 2020
CSS Tricks 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 techni...
03:04 pm GMT - Wed, February 26, 2020
CSS Tricks 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 t...
03:04 pm GMT - Wed, February 26, 2020
CSS Tricks In-Browser Performance Linting With Feature Policies
Heres a neat idea from Tim Kadlec. He uses the Modheader extension to toggle custom headers in his browser. It also lets him see when images are too big and need to be optimized in some way. This is a...
05:31 pm GMT - Tue, February 25, 2020
CSS Tricks 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 sca...
03:15 pm GMT - Tue, February 25, 2020
CSS Tricks Responsive Grid Magazine Layout in Just 20 Lines of CSS
I was recently working on a modern take of the blogroll. The idea was to offer readers a selection of latest posts from those blogs in a magazine-style layout, instead of just popping a list of our fa...
01:44 am GMT - Tue, February 25, 2020
CSS Tricks Recreating the CodePen Gutenberg Embed Block for Sanity.io
Learn how to create a custom CodePen block with a preview for Sanity Studio, inspired by Chris Coyiers implementation for Wordpress Gutenberg editor.The post Recreating the CodePen Gutenberg Embed Blo...
08:26 pm GMT - Mon, February 24, 2020
CSS Tricks 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 f...
02:41 pm GMT - Mon, February 24, 2020
CSS Tricks 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 accessibil...
02:41 pm GMT - Mon, February 24, 2020
CSS Tricks 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...
09:48 pm GMT - Fri, February 21, 2020
CSS Tricks 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 ...
09:48 pm GMT - Fri, February 21, 2020
CSS Tricks Inspiring high school students with HTML and CSS
Heres 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...
02:48 pm GMT - Fri, February 21, 2020
CSS Tricks A Guide to Console Commands
The developers 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 inc...
02:46 pm GMT - Fri, February 21, 2020
CSS Tricks 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...
09:49 pm GMT - Thu, February 20, 2020
CSS Tricks 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...
02:48 pm GMT - Thu, February 20, 2020
CSS Tricks A Guide to Console Commands
The developers 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 inc...
02:43 pm GMT - Thu, February 20, 2020
CSS Tricks 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...
02:43 pm GMT - Thu, February 20, 2020
CSS Tricks Seen by Indeed
(This is a sponsored post.)Are you looking for a tech job where you clock in, or for a career where youll be seen?Seen by Indeed is a matching service for software engineers, product managers and...
12:47 am GMT - Thu, February 20, 2020
CSS Tricks 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:<pThis next word<sup1<...
12:47 am GMT - Thu, February 20, 2020
CSS Tricks Do This to Improve Image Loading on Your Website
Jen Simmons explains how to improve image loading by simply using width and height attributes. The issue is that theres a lot of jank when an image is first loaded because an img will naturally have a...
11:47 pm GMT - Wed, February 19, 2020
CSS Tricks monica.css
Monica Dinculescu:I dont want every possible padding and margin and colour and flexbox configuration in the world. I just want the ones that I know I end up using in every project. So here ismonica.cs...
03:36 pm GMT - Wed, February 19, 2020
CSS Tricks Understanding Web Accessibility Color Contrast Guidelines and Ratios
What should you do when you get a complaint about the color contrast in your web design? It might seem perfectly fine to you because youre able to read content throughout the site, but to someone else...
03:35 pm GMT - Wed, February 19, 2020
CSS Tricks Same HTML, Different CSS
Ahmad Shadeed covers the idea of a card component that has a fixed set of semantic HTML with some BEMy classes on it. There is a title, author, image, and tags. Then he redesigns the card into five to...
10:33 pm GMT - Tue, February 18, 2020
CSS Tricks Centering a div That Maintains Aspect-Ratio When Theres Body Margin
Andrew Welch had a little CSS challenge the other day to make an ordinary div: centered vertically + horizontally scales to fit the viewport w/ a margin around it maintains an arbitrary aspect ratio N...
08:38 pm GMT - Tue, February 18, 2020
CSS Tricks Solving Sticky Hover States with @media (hover: hover)
Mezo Istvan does a good job of covering the problem and a solution to it in a blog post on Medium.If you tap on something that has a :hover state but you don't leave the page then, on a mobile device,...
03:27 pm GMT - Tue, February 18, 2020
CSS Tricks How to Build Vue Components in a WordPress Theme
The inline-template directive allows us to build rich Vue components as a progressive enhancement over existing WordPress markup.The post How to Build Vue Components in a WordPress Theme appeared firs...
03:27 pm GMT - Tue, February 18, 2020
CSS Tricks Web Component for a Code Block
We'll get to that, but first, a long-winded introduction.I'm still not in a confident place knowing a good time to use native web components. The templating isn't particularly robust, so that doesn't ...
12:07 am GMT - Tue, February 18, 2020
CSS Tricks A Complete Guide to Data Attributes
Everything you ever wanted to know about data attributes in HTML, CSS, and JavaScript.The post A Complete Guide to Data Attributes appeared first on CSS-Tricks....
03:42 pm GMT - Mon, February 17, 2020
CSS Tricks Moving from Vanilla JavaScript to a Reusable Vue Component
I recently wrote an article explaining how you can create a countdown timer using HTML, CSS and JavaScript. Now, lets look at how we can make that a reusable component by port...
03:42 pm GMT - Mon, February 17, 2020
CSS Tricks Blame the implementation, not the technique
I'm not sure we've gotten much better at this since Tim Kadlec wrote this in 2012: Stop me if youve heard this one before.Responsive design is bad for performance.User agent detection is bad. Dont seg...
08:50 pm GMT - Sun, February 16, 2020
CSS Tricks Listen to your web pages
A clever idea from Tom Hicks combining MutationObserver (which can "observe" changes to elements like when their attributes, text, or children change) and the Web Audio API for creating sounds. Plop t...
11:16 pm GMT - Sat, February 15, 2020
CSS Tricks CSS4 Update
Since I first chimed in on the CSS4 thing, there's been tons of more discussion on it. I'm going to round up my favorite thoughts from others here. There is an overwhelming amount of talk about this, ...
12:31 am GMT - Sat, February 15, 2020
CSS Tricks Creating a Details Element That Opens But Never Closes
The <details> and <summary> elements in HTML are useful for making content toggles for bits of text. By default, you see the <summary> element with a toggle triangle (▶)...
03:24 pm GMT - Fri, February 14, 2020
CSS Tricks While You Werent Looking, CSS Gradients Got Better
One thing that caught my eye on the list of features for Lea Verou's conic-gradient() polyfill was the last item:Supports double position syntax (two positions for the same color stop, as a shortcut f...
03:24 pm GMT - Fri, February 14, 2020
CSS Tricks A Complete Guide to Links and Buttons
Our complete guide to links, buttons, and button-like inputs in HTML, CSS, and JavaScript.The post A Complete Guide to Links and Buttons appeared first on CSS-Tricks....
03:13 pm GMT - Thu, February 13, 2020
CSS Tricks Why JavaScript is Eating HTML
Web development is always changing. One trend in particular has become very popular lately, and it fundamentally goes against the conventional wisdom about how a web page should be made. It is excitin...
03:13 pm GMT - Thu, February 13, 2020
CSS Tricks The Unseen Performance Costs of Modern CSS-in-JS Libraries
This article is full of a bunch of data from Aggelos Arvanitakis. But lemme just focus on his final bit of advice:Investigate whether a zero-runtime CSS-in-JS library can work for your project. Someti...
03:12 pm GMT - Thu, February 13, 2020
CSS Tricks A Headless CMS for You and Your Web Development Agency
(This is a sponsored post.)Storyblok is a headless but component-based CMS with a built-in live-preview. You can use it for building fast and reliable websites and power native apps with your favorite...
11:09 pm GMT - Wed, February 12, 2020
CSS Tricks 2020 Stack
In an article with the most clickbaity article ever, Joe Honton does a nice job of talking about the evolving landscape of web development. "Full-stack" perhaps had its day as a useful term, but since...
04:39 pm GMT - Wed, February 12, 2020
CSS Tricks Toward Responsive Elements
Hot news from Brian Kardell, regarding what we've been referring to as "container queries", the most hotly requested feature in CSS:There does seem to be some general agreement on at least one part o...
03:13 pm GMT - Wed, February 12, 2020
CSS Tricks Building an Images Gallery using PixiJS and WebGL
Sometimes, we have to go a little further than HTML, CSS and JavaScript to create the UI we need, and instead use other resources, like SVG, WebGL, canvas and others...
03:13 pm GMT - Wed, February 12, 2020
CSS Tricks Neumorphism.io
I was sort of making fun of neumorphism the other day. I don't actually care that much. I mostly just think it only works on some flat colored backgrounds, mostly really light colors, and somehow that...
11:09 pm GMT - Tue, February 11, 2020
CSS Tricks The Hooks of React Router
React Router 5 embraces the power of hooks and has introduced four different hooks to help with routing. You will find this article useful if you are looking for a quick primer on the new patterns of ...
03:14 pm GMT - Tue, February 11, 2020
CSS Tricks How to Fetch and Parse RSS Feeds in JavaScript
Say you have an RSS feed like this one. The goal is to request that RSS feed, parse it, and do something useful with the data in it. RSS is XML, and XML is arguably not as easy to work with than JSON....
03:14 pm GMT - Tue, February 11, 2020
CSS Tricks SFTP & Database Access on WordPress.com
(This is a sponsored post.)Wait what? That's right, direct access to the files and data storage that power your site on WordPress.com, just like you have if you self-host a WordPress site. You can rea...
01:13 am GMT - Tue, February 11, 2020
CSS Tricks Design Systems Blogathon
It was fun watching a bunch of back and forth blogging between a bunch of smart people quoting a bunch of smart people last week. If you missed it, you might wanna start at the end and work backward. ...
10:33 pm GMT - Mon, February 10, 2020
CSS Tricks Building the Web We Want
On the Microsoft Edge team, were committed to an open web and helping to drive innovation forward, which is why weve kicked off a new initiative in collaboration with Google, Mozilla, Samsung Internet...
03:18 pm GMT - Mon, February 10, 2020
CSS Tricks The Case of the Stolen Domain Names
Back in 2011, the domain name for this site, css-tricks.com, was stolen. "Domain Hijacking," they call it. It wasn't just this site, but around 12 others in the design and development space. To this d...
03:18 pm GMT - Mon, February 10, 2020
CSS Tricks Helping Browsers Optimize With The CSS Contain Property
There is a growing number of things that we have to do to help the browser achieve for peak performance.Responsive image syntax has several. For example, needing to tell the browser how large the imag...
10:47 pm GMT - Fri, February 7, 2020
CSS Tricks Is Having an RSS Feed Just Giving Content Away for Free?
I mean, kinda.I was just asked this question the other day so I'm answering here because blogging is cool. The point of an RSS feed is for people to read your content elsewhere (hence the last part of...
10:46 pm GMT - Fri, February 7, 2020
CSS Tricks Guillermos 2019 in Review
Of all the tech-focused year-in-review posts I read, Guillermo Rauch's is my favorite. There is a lot in there, jumping from topics like modern architectures, high-fiving specific apps, and philosophi...
03:27 pm GMT - Fri, February 7, 2020
CSS Tricks Custom Styling Form Inputs With Modern CSS Features
Its entirely possible to build custom checkboxes, radio buttons, and toggle switches these days, while staying semantic and accessible. We dont even need a single line of JavaScript or extra HTML elem...
03:27 pm GMT - Fri, February 7, 2020
CSS Tricks Old CSS, new CSS
I love this post that walks through the development of CSS and HTML it shows just how far web design has come and how much easier it is for us all now. Eevee looks at designing websites with tables, ...
12:59 am GMT - Fri, February 7, 2020
CSS Tricks Full-Width Elements By Using Edge-to-Edge Grid
If you have a limited-width container, say a centered column of text, "breaking out" of that to make a full-width element involves trickery. Perhaps the best trick is the one with left relative positi...
12:59 am GMT - Fri, February 7, 2020
CSS Tricks Getting Fancy with position: sticky;
Mike Solomon worked on a fancy scrollytelling post for Esquire and blogged about it. It has GIFs of each step along the way of figuring out not just position: sticky; but also using negative margins, ...
03:13 pm GMT - Thu, February 6, 2020
CSS Tricks Getting Acquainted With Svelte, the New Framework on the Block
For the last six years, Vue, Angular, and React have run the world of front-end component frameworks. Google and Facebook have their own sponsored frameworks, but they might leave a bitter taste for a...
03:13 pm GMT - Thu, February 6, 2020
CSS Tricks Building an accessible autocomplete control
Heres a great in-depth post from Adam Silver about his journey to create an autocomplete field thats as accessible as possible. There are so many edge cases to consider! There are old browsers and the...
11:27 pm GMT - Wed, February 5, 2020
CSS Tricks Browser Version Release Spectrum
Whenever a browser upgrades versions, it's a little marketing event, and rightly so. Looks like for Firefox it's about once a month, Chrome is ~6 weeks, and Safari is once a year. Chrome 80 just dropp...
09:19 pm GMT - Wed, February 5, 2020
CSS Tricks HTTPS is Easy!
I've been guilty of publicly bemoaning the complexity of HTTPS. In the past, I've purchased SSL certificates from third-party vendors and had trouble installing them. I've had certificates expire and ...
09:19 pm GMT - Wed, February 5, 2020
CSS Tricks Native Image Lazy Loading in Chrome Is Way Too Eager
Interesting research from Aaron Peters on <img loading="lazy" ... >:On my 13 inch macbook, with Dock positioned on the left, the viewport height in Chrome is 786 pixels so images with loa...
03:33 pm GMT - Wed, February 5, 2020
CSS Tricks CSS4 is a Bad Idea
Louis Lazaris, reacting to the idea of CSS4:The reason CSS3 worked is because it was real. It was the successor to CSS2.1. Everything after CSS2.1 was considered to be under the umbrella of CSS3. The ...
03:26 pm GMT - Wed, February 5, 2020
CSS Tricks Creating an Editable Webpage With Google Spreadsheets and Tabletop.js
Please raise your hand if youve ever faced never-ending content revision requests from your clients. Its not that the changes themselves are difficult, but wouldn't it be less complicated if clients c...
03:18 pm GMT - Wed, February 5, 2020
CSS Tricks Select an Element with a Non-Empty Attribute
Short answer:[data-foo]:not([data-foo=""] {Longer answer (same conclusion, just an explanation on why we might need this):Say you have an element that you style with a special data-attribute:<div ...
08:51 pm GMT - Tue, February 4, 2020
CSS Tricks CSS4
Tab Atkins in 2012:There has never been a CSS4. There will never be a CSS4. CSS4 is not a thing that exists.Rachel Andrew in 2016:While referring to all new CSS as CSS3 worked for a short ti...
05:12 pm GMT - Tue, February 4, 2020
CSS Tricks How To Create A Headless WordPress Site On The Jamstack
Just this morning, Chris shared a streamlined way to get a static site up and running with Netlify. As it happens, Sarah and I also wrote up a little something that expands that idea where a static si...
04:10 pm GMT - Tue, February 4, 2020
CSS Tricks PHP is A-OK for Templating
PHP templating often gets a bad rap for facilitating subpar code but that doesn't have to be the case. Lets look at how PHP projects can enforce a basic Model, View, Controller (MVC) structure withou...
04:10 pm GMT - Tue, February 4, 2020
CSS Tricks Overcomplicatin
There's some famous quote that goes something like...When we're young, we make simple things because that's all we know. Then we learn how to make complex things so we make complex things. When we gro...
04:10 pm GMT - Tue, February 4, 2020
CSS Tricks Possibly The Easiest Way to Run an SSG
"Static Site Generator," that is. We'll get to that in a second. Netlify is a sponsor of this site (thank you very much), and I see Zach Leatherman has gone to work over there now. Very cool. Zach is ...
08:29 pm GMT - Mon, February 3, 2020
CSS Tricks The Three Types of Code
Every time I start a new project, I organize the code Im looking at into three types, or categories if you like. And I think these types can be applied to any codebase, any language, any technology or...
08:29 pm GMT - Mon, February 3, 2020
CSS Tricks Freezing User-Agent Strings
There's been news about Chrome freezing their User-Agent string (and all other major browsers are on board). That means they'll still have a User-Agent (UA) string (that comes across in headers and is...
04:14 pm GMT - Mon, February 3, 2020
CSS Tricks How to Create an Animated Countdown Timer With HTML, CSS and JavaScript
Have you ever needed a countdown timer on a project? For something like that, it might be natural to reach for a plugin, but its actually a lot more straightforward to make one than you might think an...
02:50 pm GMT - Mon, February 3, 2020
CSS Tricks Get Moving (or not) with CSS Motion Path
We just linked up the idea that offset-path can be cleverly used to set type on a path. Don't miss Michelle Barker's experimentation either, with drawing paths or animating text along a path. Dan Wils...
09:09 pm GMT - Sat, February 1, 2020
CSS Tricks Full Stack Panic
A new podcast from Sean Fioritto inspired by Joel Califa's term "Full Stack Anxiety". ... the little voice in your head says ... I should know all of this. Do I even know what I'm doing? Why do web de...
04:54 pm GMT - Fri, January 31, 2020
CSS Tricks Innovation Cant Keep the Web Fast
Every so often, the fruits of innovation bear fruit in the form of improvements to the foundational layers of the web. In 2015, HTTP/2 became a published standard in an effort to update an aging proto...
04:54 pm GMT - Fri, January 31, 2020
CSS Tricks Smaller HTML Payloads with Service Workers
Short story: Philip Walton has a clever idea for using service workers to cache the top and bottom of HTML files, reducing a lot of network weight.Longer thoughts: When you're building a really simple...
04:54 pm GMT - Fri, January 31, 2020
CSS Tricks Lightning-Fast Web Performance
If you're interested in leveling up your knowledge and skill of web performance, you can't do better than learning directly from Scott Jehl.Direct Link to Article — Permalink… Read article...