2021-05-04

CSS-Tricks

16px or Larger Text Prevents iOS Form Zoom

This was a great “Today I Learned” for me from Josh W. Comeau. If the font-size of an <input> is 16px or larger, Safari on iOS will focus into the input normally. But as soon as the font-size is … The post 16px or Larger Text Prevents iOS Form Zoom appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 2 min
Jetpack Backup: Roll Back Your WooCommerce Site Without Losing Orders

Here’s a dilemma: what happens if your WooCommerce site has a problem and the quickest and best way to fix it is to roll back to a previous version? The dilemma is, if you roll back the database, you would … The post Jetpack Backup: Roll Back Your WooCommerce Site Without Losing Orders appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 2 min
Let’s use (X, X, X, X) for talking about specificity

I was just chatting with Eric Meyer the other day and I remembered an Eric Meyer story from my formative years. I wrote a blog post about CSS specificity, and Eric took the time to point out the misleading nature … The post Let’s use (X, X, X, X) for talking about specificity appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 3 min
Creating Colorful, Smart Shadows

A bona fide CSS trick from Kirupa Chinnathambi here. To match a colored shadow with the colors in the background-image of an element, you inherit the background in a pseudo-element, kick it behind the original, then blur and filter it. … The post Creating Colorful, Smart Shadows appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 4 min

Articles on Smashing Magazine — For Web Designers And Developers

A Guide To Undoing Mistakes With Git

No matter how experienced you are, mistakes are an inevitable part of software development. But we can learn to repair them! And this is what we'll be looking at in this two-part series: how to undo mistakes using Git.

Read · 6 min
Smashing Podcast Episode 36 With Miriam Suzanne: What Is The Future Of CSS?

In this episode, we’re starting our new season of the Smashing Podcast with a look at the future of CSS. What new specs will be landing in browsers soon? Drew McLellan talks to expert Miriam Suzanne to find out.

Read · 23 min

Go Make Things

Template literals and string interpolation in vanilla JS

Introduced in ES6, template literals provide a simpler way to create strings that span multiple lines or contain data. Today, we’re going to look at how they work. The basic syntax Instead of quotes, template literals start and end with backticks (`). You do not need to concatenate new lines in template literals the way you would with quotes. let str1 = `<h1>Hello, world!</h1> <p>How are you today?</p>`; // logs "<h1>Hello, world!

Read · 2 min

Christian Heilmann

Answering questions about my career for honeypot.io

A few weeks ago Honeypot.io asked me to answer a few questions about my career, and here is the video of my answers. 00:00 Introduction 00:31 What are your top tips for career advancement? 02:03 What strengths are most important for a developer? 04:07 Work-life balance: how do you do it? 05:11 What mistakes have […]

Read · 1 min

Logic Magazine

Power Curve

Futures are always arriving. They are never evenly distributed.

Read · 3 min

Ahmad Shadeed Blog

The State of CSS Cross-Browser Development

My thoughts on why cross-browser development is better than in the past.

Read · 8 min

2021-05-03

CSS-Tricks

Chapter 8: CSS

In June of 2006, web developers and designers from around the world came to London for the second annual @media conference. The first had been a huge success, and @media 2006 had even more promise. Its speaker lineup was pulled … The post Chapter 8: CSS appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 21 min
Swipey Image Grids

I hope people think of SVG as a vector format that is good for drawing things. There is plenty more to know, but here’s one more: SVG is good for composition. You draw things at very specific coordinates … The post Swipey Image Grids appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 3 min
WebPageTest API

I’m willing to bet you know WebPageTest. It is the premier tool in the toolbox of web performance people. Maybe you didn’t know that WebPageTest was a side project of one fella, Patrick Meenan, for most of its lifetime, … The post WebPageTest API appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 30 min

Go Make Things

Coding is breaking problems into tiny parts

One of the most common challenges I hear from students who are just learning JavaScript is around knowing how to actually build projects from scratch. You can learn a many of the commonly used JS methods and browser APIs and run through a bunch of practice exercises, but how do you take that knowledge and actually apply it to a task? Today, we’re going to talk about that. Breaking projects up into pieces The thing that helped me the most early on was figuring out how to take a big project and break it…

Read · 5 min

Articles on Smashing Magazine — For Web Designers And Developers

The Evolution Of Jamstack

Web-oriented databases, frameworks like Nuxt and Next.js, and even frameworkless approaches are evolving the Jamstack, but the core principles are more powerful than ever.

Read · 7 min

2021-04-30

CSS-Tricks

Safari 14.1 Adds Support for Flexbox Gaps

Yay, it’s here! Safari 14.1 reportedly adds support for the gap property in flexbox layouts. We’ve had grid-gap support for some time, but true to its name, it’s limited to grid layouts. Now we can use gap in either type … The post Safari 14.1 Adds Support for Flexbox Gaps appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 2 min
Web Languages as Compile Targets

Jim Nielsen quoting Eric Bailey: He references an example on Twitter where someone noted you can use the <details> element to “create a native HTML accordion,” to which someone responded: “this works without Bootstrap? 🤯” What’s the problem here? From … The post Web Languages as Compile Targets appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 3 min
Jenny B Kowalski’s A-Z (and a-z) as Variable Letterforms

Jenny B Kowalski has been posting a-letter-a-day on Instagram exploring multi-axis variable/responsive letterforms. They are very clever in that one of the axes controls an uppercase-to-lowercase conversion, literally morphing the shape of the letters from an uppercase version to a … The post Jenny B Kowalski’s A-Z (and a-z) as Variable Letterforms appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 1 min
You Can Label a JavaScript `if` Statement

Labels are a feature that have existed since the creation of JavaScript. They aren’t new! I don’t think all that many people know about them and I’d even argue they are a bit confusing. But, as we’ll see, labels can … The post You Can Label a JavaScript `if` Statement appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 5 min

Go Make Things

How to setup a middleman API with vanilla JS

This is another excerpt from my new and updated APIs and Asynchronous JS pocket guide. Yesterday, we looked at API credentials and security with vanilla JS. Near the end of the article, I noted… Sometimes, APIs require credentials but don’t provide short term tokens. For example, the Mailchimp API uses a permanent API key with basic auth to authenticate every request. Alternatively, you made need to make an authenticated API call that does not require any input from a user.

Read · 2 min

Articles on Smashing Magazine — For Web Designers And Developers

May Is In The Air (2021 Wallpapers Edition)

Do you need a little inspiration boost? Well, then our new collection of wallpapers is for you. Designed with love by the community for the community, the wallpapers are available with and without a calendar for May 2021.

Read · 7 min

2021-04-29

CSS-Tricks

Sending Large Files

I’ve got a podcast that will be 10 years old this coming January! Most of those episodes have one or more guests (plus me and Dave). Despite fancy modern options for recording podcasts with guests, like Riverside.fm or Zencastr… The post Sending Large Files appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 4 min
How to Monitor Core Web Vitals and Take Action with Raygun

Raygun is an error and performance monitoring software for websites and mobile apps. In the case of websites, you install their JavaScript snippet onto your site, which takes 2 seconds, and now you’ve got monitoring in place. Why? Well now … The post How to Monitor Core Web Vitals and Take Action with Raygun appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 2 min
List Markers and String Styles

Lists—we’ve all worked with them in one form or another. I’m talking about HTML’s <ol> and <ul>. Much of the time, because we desire styling control, we turn off the list’s markers completely with list-style-type: none, and start … The post List Markers and String Styles appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 3 min

Go Make Things

API credentials and security with vanilla JS

This is another excerpt from my new and updated APIs and Asynchronous JS pocket guide. Yesterday, we looked at different ways to authenticate APIs with vanilla JS. Whenever you’re dealing with credentials, you need to be concerned about security. In the article, I had a few examples where the API credentials were hard-coded into the JS file, with this following note… IMPORTANT: You should not store your API credentials in a JS file like this.

Read · 2 min

A List Apart: The Full Feed

Immersive Content Strategy

Beyond the severe toll of the coronavirus pandemic, perhaps no other disruption has transformed user experiences quite like how the tethers to our formerly web-biased era of content have frayed. We’re transitioning to a new world of remote work and digital content. We’re also experimenting with unprecedented content channels that, not too long ago, elicited chuckles at the watercooler, like voice interfaces, digital signage, augmented reality, and virtual reality. Many factors are responsible. Perhaps it’s …

Read · 18 min

Articles on Smashing Magazine — For Web Designers And Developers

The Humble `` Element And Core Web Vitals

Images have also been a key part of the web. They communicate ideas instantly, but they are also a lot heavier than text to load. This means that it’s essential to get loading and displaying them right, if you want to give your users a fantastic first impression. An excerpt from [Addy's new book](https://www.smashingmagazine.com/2021/04/image-optimization-pre-release/) (also, check a [free PDF preview](http://provide.smashingmagazine.com/eBooks/image-optimization-sample-chapter.pdf)).

Read · 18 min

2021-04-28

CSS-Tricks

Your Team is Not “Them”

This post was written for engineering managers, but anyone is welcome to read it. Let’s talk for a moment about how we talk about our teams. This might not seem like something that needs a whole article dedicated to it, … The post Your Team is Not “Them” appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 6 min
How to Create Actions for Selected Text With the Selection API

Click, drag, release: you’ve just selected some text on a webpage — probably to copy and paste it somewhere or to share it. Wouldn’t it be cool if selecting that text revealed some options that make those tasks easier? That’s … The post How to Create Actions for Selected Text With the Selection API appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 5 min

Go Make Things

API authentication with vanilla JS

This is an excerpt from my new and updated APIs and Asynchronous JS pocket guide. Some APIs—like the Ron Swanson Quotes Generator and Random Dog—work by simply calling an endpoint. Others—like the New York Times and many endpoints for the GitHub API—require you to authenticate who you are before you can make API calls. How to authenticate an API To authenticate you, the API may require: Your username and password.

Read · 2 min

Articles on Smashing Magazine — For Web Designers And Developers

Meet Image Optimization, A New Smashing Book By Addy Osmani

The cat is out! For the last year, we’ve been working with Addy Osmani on a new Smashing Book all around image optimization. And now it’s here. Meet “Image Optimization”, our practical modern guide to delivering high-quality images on the web with the best performance.

Read · 7 min

2021-04-27

CSS-Tricks

Shared Element Transitions

I was just Hoping for Better Native Page Transitions, and Bramus commented that Chrome is working on something. Looks like it has some fresh enthusiasm for it, as there is a brand new repo, and you can literally test … The post Shared Element Transitions appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 2 min
A Complete Guide to Custom Properties

Everything important and useful to know about CSS Custom Properties. Like that they are often referred to as "CSS Variables" but that's not their real name. The post A Complete Guide to Custom Properties appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 18 min

daverupert.com

The OceanMaker

There’s two features I look for in good sci-fi: 1. something I hadn’t imagined before and 2. something that anticipates the automobile, as well as the traffic jam. The YouTube gods smiled up me and surfaced a channel called DUST, a massive collection sci-fi short films. The quality is much better than what you might expect from “free sci-fi” but one of their films, The OceanMaker, is an absolute standout that raptured me and took me somewhere I’ve never been. Extrapolating on the near future Water Wars, The…

Read · 1 min

Go Make Things

Custom event naming conventions in vanilla JS

Over the last few days, we’ve learned about how to create custom events, how to cancel them, and how to create a helper function to make them easier to work with. Today, we’re going to learn about naming conventions: things to do, things to avoid, and some common gotchas. Prefix event names To help prevent naming collisions between the custom events in your library and others, it’s a good idea to prefix them with your library name.

Read · 1 min

UX Movement

When to Display Radio Buttons in a Scaled Format

You’re probably used to displaying radio buttons in a list format. However, list formats aren’t optimal for scaled items and can slow users down. Scaled items are items that can be quantified or measured on a scale. When they’re in a list format, users need to read each item and think about how they relate […] When to Display Radio Buttons in a Scaled Format first appeared on UX Movement.

Read · 1 min
When You Shouldn’t Display Radio Buttons in a List Format

You’re probably used to displaying radio buttons in a list format. However, list formats aren’t optimal for scaled items and can slow users down. Scaled items are items that can be quantified or measured on a scale. When they’re in a list format, users need to read each item and think about how they relate […] When You Shouldn’t Display Radio Buttons in a List Format first appeared on UX Movement.

Read · 1 min
Why You Should Stop Using Radio Buttons for Scaled Items

When it comes to item selection, items are a list in code. However, that doesn’t mean the items always need to look like a list in pixels. Sometimes users can make selections more efficiently when your items aren’t in a list format. Thinking beyond lists for selecting scaled items will enable you to design forms […] Why You Should Stop Using Radio Buttons for Scaled Items first appeared on UX Movement.

Read · 2 min

Articles on Smashing Magazine — For Web Designers And Developers

Understanding Easing Functions For CSS Animations And Transitions

Easing functions can change the look and feel of an animation by affecting the rate, or speed, of an animation. In this article, we’re going to take a deep dive into easing functions and see how we can use them to create those natural and stunning animations.

Read · 9 min

Ahmad Shadeed Blog

Practical Use Cases For CSS Variables

The goal of this article is to walk you through use-cases where CSS variables shine.

Read · 6 min

2021-04-26

CSS-Tricks

Exploring color-contrast() for the First Time

I saw in the release notes for Safari Technical Preview 122 that it has support for a color-contrast() function in CSS. Safari is first out of the gate here. As far as I know, no other browser supports this yet … The post Exploring color-contrast() for the First Time appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 3 min
Generating (and Solving!) Sudokus in CSS

I love to make CSS do stuff it shouldn’t. It’s the type of problem-solving brain training you’d get building a calculator in Minecraft, except you probably won’t get a job working with Minecraft Redstone no matter how good you … The post Generating (and Solving!) Sudokus in CSS appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 15 min

Go Make Things

A custom event helper function

Last week, we looked at how to create custom events with vanilla JS, and how to cancel custom events with event.preventDefault(). Today, I’m going to share a helper function I use to make emitting custom events a little bit easier. Creating an emitEvent() helper function To get started, let’s create an emitEvent() function. When emitting custom events, there are three things we may need: an event type, any details we may want to attach to the event, and an element to emit the event on.

Read · 2 min

Articles on Smashing Magazine — For Web Designers And Developers

How To Bake Layers Of Accessibility Testing Into Your Process

Accessibility experts Kate Kalcevich and Mike Gifford introduce readers to "layered accessibility testing”, a practice of using a variety of tools and approaches at different stages in the digital product lifecycle to catch accessibility issues early — when it’s easier and cheaper to fix them.

Read · 11 min

2021-04-23

CSS-Tricks

Eliminating five top compatibility pain points on the web

Robert Nyman and Philip Jägenstedt: Google is working with other browser vendors and industry partners to fix the top five browser compatibility pain points for web developers. The areas of focus are CSS Flexbox, CSS Grid, position: sticky,  … The post Eliminating five top compatibility pain points on the web appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 4 min
Using New Gatsby Source WordPress Plugin

In my previous article, I discussed how I learned to create a decoupled WordPress powered Gatsby site using the Gatsby Source WPGraphQL plugin. The project was done following the ongoing developmental version of WPGraphQL and an excellent tutorial by Henrik … The post Using New Gatsby Source WordPress Plugin appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 20 min

Go Make Things

Canceling custom events with vanilla JS

Yesterday, we looked at how to create custom events for your libraries, components, and scripts. Today, I wanted to explore how to cancel custom events. Let’s dig in. What is canceling an event? If your custom event has the cancelable option set to true, you can use the Event.preventDefault() method to cancel it. document.addEventListener('my-custom-event', function (event) { // Cancel the event event.preventDefault(); }); Inside the bit of code that emitted the event, you can then detect if…

Read · 1 min

Articles on Smashing Magazine — For Web Designers And Developers

A Guide To Newly Supported, Modern CSS Pseudo-Class Selectors

The CSS Working Group Editor’s Draft for [Selectors Level 4](https://drafts.csswg.org/selectors-4/) includes several pseudo-class selectors that already have proposal candidates in most modern browsers. This guide will cover ones that currently have the best support along with examples to demonstrate how you can start using them today!

Read · 8 min

2021-04-22

CSS-Tricks

Text That Sometimes Turns to Emojis

There are some Unicode characters that some browsers just decide they are going to turn into emojis for you. I couldn’t tell you why exactly, but here’s what I see: Chrome on the left. Safari in the simulator on top… The post Text That Sometimes Turns to Emojis appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 3 min
The Almost-Complete Guide to Cumulative Layout Shift

Here’s Jess B. Peck writing all about Google’s Core Web Vitals: Let’s step back one. CLS is when you’re about to click on a link, and the whole page shifts and you click on a different link instead. It’s when … The post The Almost-Complete Guide to Cumulative Layout Shift appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 26 min
Tools to Improve UX and Win Over Your Customers

Try Hotjar for free today! An enjoyable user experience and high conversion rates go hand-in-hand. It makes sense then, that if you want to improve conversion rates, your first task is to improve user experience. To improve UX, deeply understanding … The post Tools to Improve UX and Win Over Your Customers appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 5 min
The Making (and Potential Benefits) of a CSS Font

Not a typical one, at least. Each character is an HTML element, built with CSS. A true web font! Let me elaborate. This is a way to render text without using any font at all. Random text is split with … The post The Making (and Potential Benefits) of a CSS Font appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 12 min

Go Make Things

Custom events in vanilla JS

In your JavaScript libraries, components, and snippets, you can emit a custom event that developers can listen for with the Element.addEventListener() method. This provides a way for developers to hook into your code in ways that you didn’t expect or plan for. Let’s look at how it works. The CustomEvent object The CustomEvent object provides a way to create and emit custom events, as well as pass in custom event details.

Read · 1 min

Articles on Smashing Magazine — For Web Designers And Developers

Web Design Done Well: The Ordinary Made Extraordinary (Part 1)

Sometimes it’s the little things in web life that make us look twice. From carousels to documentation to cookie disclaimers, here are some sites taking the mundane and sprinkling in a little magic.

Read · 6 min

A List Apart: The Full Feed

Do You Need to Localize Your Website?

Global markets give you access to new customers. All you need to do is inform potential buyers about your product or service.  Your website is a good place to introduce your product or service outside your locale. Localizing your web content sounds like the right way to reach out to the global market. Localization will bridge the language barriers, or the wider scope of differing cultures.  Before we move on further with the discussion, let’s focus on the definition of “localization.”  What i…

Read · 10 min

2021-04-21

CSS-Tricks

Still Hoping for Better Native Page Transitions

It would be nice to be able to animate the transition between pages if we want to on the web without resorting to hacks or full-blown architecture choices to achieve it. I could imagine an API that would run stuff… The post Still Hoping for Better Native Page Transitions appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 3 min
Sticky Headers: 5 Ways to Make Them Better

Page Laubheimer says that if you’re going to do a sticky header… Keep it small. Visually contrast it with the rest of the page. If it’s going to move, keep it minimal. (I’d say, respect prefers-reduced-motion.) Consider “partially persistent … The post Sticky Headers: 5 Ways to Make Them Better appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 8 min
How to Add a Double Border to SVG Shapes

Let’s say someone asks you to add a double border to some random geometric SVG shapes. For some reason, you can’t use any graphic editor — they need to be generated at runtime — so you have to solve it … The post How to Add a Double Border to SVG Shapes appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 3 min

Go Make Things

Challenges and limitations with advanced selectors and the document.querySelectorAll() method

Yesterday, I wrote about how to get all direct descendants that match a test condition. A substantial number of folks wrote to me asking why I would use the Array.filter() method with the Node.children property instead of using a nested selector with the document.querySelectorAll() method. let tuna = document.querySelectorAll('#sandwiches > .tuna'); This absolutely works when… The parent element has a unique selector, and You want to filter child elements based on a CSS selector.

Read · 1 min

Articles on Smashing Magazine — For Web Designers And Developers

A Complete Guide To Incremental Static Regeneration (ISR) With Next.js

Incremental Static Regeneration (ISR) is a new evolution of the Jamstack, allowing you to update static content instantly without needing a full rebuild of your site. The hybrid approach of Next.js allows you to use ISR for e-commerce, marketing pages, blog posts, ad-backed media, and more.

Read · 6 min
Why Content Is Such A Fundamental Part Of The Web Design Process

As designers, we are often burdened by the responsibility of producing and managing website content. It’s not our job to write it, but it’s not the client’s either. We can avert disaster by including content production in the design process.

Read · 10 min

2021-04-20

Go Make Things

How to get all direct descendants that match a test condition with vanilla JS

Let’s say you have some HTML like this. <div id="sandwiches"> <div id="one" class="tuna">This will match</div> <div> Hello, world! <div id="two" class="tuna">This will not</div> </div> <div id="three" class="tuna">So will this</div> </div> You want to get only direct descendants of the #sandwich element that have the .tuna class: #one and #three. The #two element also has the .tuna class…

Read · 1 min

CSS-Tricks

Intrinsic Typography is the Future of Styling Text on the Web

The way we style text hasn’t changed much over the years. There have been numerous advancements to help make things more flexible, like layouts, but in terms of styling, most finite aspects of our designs, like text, remain relatively unchanged. … The post Intrinsic Typography is the Future of Styling Text on the Web appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 6 min
Say Hello to CSS Container Queries

Container queries are finally here! Now available behind a flag in the latest version of Chrome Canary, you can go ahead and experiment to your heart’s content. Oh, and if you’re not familiar with container queries then check out … The post Say Hello to CSS Container Queries appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 7 min

Articles on Smashing Magazine — For Web Designers And Developers

Making GraphQL Work In WordPress

Let’s explore the plugins providing GraphQL servers to WordPress. When should we use WPGraphQL, and when the GraphQL API for WordPress? Is there some advantage of one over the other, or some particular task that is easier to accomplish with one of them? In this article, we will find out.

Read · 12 min

UX Movement

ExchangeRatesAPI: Convert Your Prices to Foreign Currencies for Free

Online shopping has become an international phenomenon. Users from all over the world now go online to buy their favorite products. A common UX issue international users face is not knowing how much a product and shipping costs because they are in a foreign currency. Stores that don’t convert their currencies give off the impression […] ExchangeRatesAPI: Convert Your Prices to Foreign Currencies for Free first appeared on UX Movement.

Read · 2 min

2021-04-19

CSS-Tricks

How to Improve CSS Performance

There is no doubt that CSS plays a huge role in web performance. Milica Mihajlija puts a point on exactly why: When there is CSS available for a page, whether it’s inline or an external stylesheet, the browser delays rendering … The post How to Improve CSS Performance appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 7 min
Float an Element to the Bottom Corner

Need to lay out an element to the right or the left, such that text wraps around it? That’s an easy task for the float property. But what about if you also want to push that element (let’s call it … The post Float an Element to the Bottom Corner appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 5 min

Go Make Things

How to add and remove classes with vanilla JS

The Element.classList API provides methods that you can use to add(), remove(), toggle() and check if an element contains() a class or classes. let elem = document.querySelector('#sandwich'); // Add the .turkey class elem.classList.add('turkey'); // Remove the .tuna class elem.classList.remove('tuna'); // Toggle the .tomato class on or off // (Add the class if it's not already on the element, remove it if it is.) elem.classList.toggle('tomato'); // Check if an element has…

Read · 1 min

Articles on Smashing Magazine — For Web Designers And Developers

An In-Depth Guide To Measuring Core Web Vitals

How are Core Web Vitals measured? How do you know your fixes have had the desired effect and when will you see the results in Google Search Console? Let’s figure it out.

Read · 24 min

2021-04-16

CSS-Tricks

Creating an Editable Textarea That Supports Syntax-Highlighted Code

When I was working on a project that needed an editor component for source code, I really wanted a way to have that editor highlight the syntax its typed. There are projects like this, like CodeMirror, Ace, and … The post Creating an Editable Textarea That Supports Syntax-Highlighted Code appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 6 min
Platform News: Using :focus-visible, BBC’s New Typeface, Declarative Shadow DOMs, A11Y and Placeholders

There’s a whole lot of accessibility in this week’s news, from the nuances of using :focus-visible and input placeholders, to accessible typefaces and a Safari bug with :display: contents. Plus, a snippet for a bare-bones web component that supports … The post Platform News: Using :focus-visible, BBC’s New Typeface, Declarative Shadow DOMs, A11Y and Placeholders appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 5 min
Not Your Typical Horizontal Rules

The default browser style for <hr> is so weird. It’s basically: border-style: inset; border-width: 1px; The default border-color is black, but the border doesn’t actually look black, because the inset border “adds a split tone to the line … The post Not Your Typical Horizontal Rules appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 7 min

Go Make Things

How to get all of the query string parameters from a URL with vanilla JS

Let’s imagine you have a URL with some query string parameters, and you want to get an object with all of the key/value pairs in that string. let url = 'https://sandwich-shop.com?sandwich=chicken%20salad&bread=wheat&topping=tomato&topping=spicy+mayo'; Today, let’s learn how to do that. Creating a helper function Let’s start by creating a helper function, getParams(). We’ll accept a url as an argument, but use the window.location as a default if one is not provide…

Read · 2 min

Christian Heilmann

Tabs vs. Spaces show on Developer tools

If you got 25 minutes to spare, here’s a great episode of Matt Wojciakowski ’s “Tabs vs. Spaces” show where I talk together with my colleagues Erica Draud and Rachel Simone Weil about Edge Developer tools, accessibility, PWAs and what we’re doing to make it easier for beginners to get started.

Read · 1 min

Articles on Smashing Magazine — For Web Designers And Developers

Seven Mistakes To Avoid In Your Technical Interviews

It’s no secret that the technical interview process leaves something to be desired; it’s often riddled with anxiety and stress. In this article, we’ll take a look at seven of the most common mistakes candidates make in their technical interviews and explore ways you can avoid them.

Read · 10 min

2021-04-15

CSS-Tricks

Flash of inAccurate coloR Theme (FART)

There is a lot to think about when implementing a dark mode theme on a website. We have a huge guide on it. There are some very clever quick wins out there, but there are also some quite tricky things … The post Flash of inAccurate coloR Theme (FART) appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 2 min
The Importance of Career Laddering

The title of this article is misleading. It’s not actually very important for an Engineering Manager to use career laddering, per se, or my process. It is, however, very important that an Engineering Manager is clear with their employees… The post The Importance of Career Laddering appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 8 min
How to Build a FullStack Serverless HN Clone With Svelte and Fauna

Svelte is a free and open-source front end JavaScript framework that enables developers to build highly performant applications with smaller application bundles. Svelte also empowers developers with its awesome developer experience. Svelte provides a different approach to building web apps … The post How to Build a FullStack Serverless HN Clone With Svelte and Fauna appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 4 min

Go Make Things

2021 is the year of modern JavaScript

JavaScript and the browser environment have changed quite a bit since I first released the Vanilla JS Pocket Guides a few years ago. A lot of the techniques and approaches I recommended in them have been replaced by newer, modern ones that result in less code and a better developer experience. IE is now a deprecated browser. Today, I released a completely updated set of Pocket Guides, with new methods and modern JS approaches.

Read · 3 min

Articles on Smashing Magazine — For Web Designers And Developers

How To Get Web Design Clients Fast (Part 2)

Selling is key to growing your web design business, but it doesn’t have to be complicated! With clear goals, customer research, and proven closing techniques, anyone can find new clients.

Read · 12 min
From Cats With Love: New Navigation, Guides And Workshops

At Smashing, we’ve been busy over the last few months. We’ve set up new workshops, redesigned our navigation, refined performance and improved accessibility. There are subtle UX changes coming in, and we’d love to share what we’ve been cooking.

Read · 3 min

2021-04-14

CSS-Tricks

Building a Settings Component

This is a tremendous CSS-focused tutorial from Adam Argyle. I really like the “just for gap” concept here. Grid is extremely powerful, but you don’t have to use all its abilities every time you reach for it. Here, Adam … The post Building a Settings Component appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 11 min
Building a Settings Component

This is a tremendous CSS-focused tutorial from Adam Argyle. I really like the “just for gap” concept here. Grid is extremely powerful, but you don’t have to use all its abilities every time you reach for it. Here, Adam … The post Building a Settings Component appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Read · 4 min