Using React Portals to Render Children Outside the DOM Hierarchy

Say we need to render a child element into a React application. Easy right? That child is mounted to the nearest DOM element and rendered inside of it as a result.

render() { return ( 
// Child to render inside of the div
); }

But! What if we want to render that child outside of the div somewhere else? That could be tricky because it breaks the convention that a component needs to render as a new … Read article

The post Using React Portals to Render Children Outside the DOM Hierarchy appeared first on CSS-Tricks.

Read more

Can You Create a Functional (and Effective) Website Without Spending a Dollar?

It’s said that nothing tastes as good as free, but is it really possible to get a website up and running without spending any money at all? This is a common question – for both beginners and experts to site development. In fact, there are plenty of tools, platforms, and services that offer completely free …
The post Can You Create a Functional (and Effective) Website Without Spending a Dollar? appeared first on Torque.
Read more

Design v17

We rolled out a new site design on January 1! This is the 17th version of CSS-Tricks if you can believe that. The versions tend to evolve a decent amount beyond the initial launch, but we archive screenshots on this design history page. Like I said in our 2018 thank you post:

This is easily the most time, effort, and money that’s gone into a redesign since the big v10 design. There are a lot of aesthetic changes,

Read article

The post Design v17 appeared first on CSS-Tricks.

Read more

The Ethics of Web Performance

Tim Kadlec on the issues surrounding poor web performance and why it’s so important for us to care about making our sites as fast as possible:

Poor performance can, and does, lead to exclusion. This point is extremely well documented by now, but warrants repeating. Sites that use an excess of resources, whether on the network or on the device, don’t just cause slow experiences, but can leave entire groups of people out.

There is a growing gap between what

Read article

The post The Ethics of Web Performance appeared first on CSS-Tricks.

Read more

Brochure Design Ideas & Inspiration for 2019

Almost every designer has created a brochure at some point. And there’s a strong possibility you’ll be asked to design another! Whether it’s for a client or to promote your own business, there’s an art to designing a brochure. And then there’s an added challenge: brochure design isn’t just for print anymore. Digital brochures are […]
Read more

Slice and Dice a Disc with CSS

I recently came across an interesting sliced disc design. The disc had a diagonal gradient and was split into horizontal slices, offset a bit from left to right. Naturally, I started to think what would the most efficient way of doing it with CSS be.

Sliced gradient disc.

The first thought was that this should be doable with border-radius, right? Well, no! The thing with border-radius is that it creates an elliptical corner whose ends are tangent to the Read article

The post Slice and Dice a Disc with CSS appeared first on CSS-Tricks.

Read more

Re: Pleasing Color Palettes

There are so many tools out there to help you pick colors. I totally get it! It’s hard! When colors are done well, it’s like magic. It adds a level of polish to a design that can really set it apart.

Let’s look at some, then talk about this idea some more.

Here’s one I just saw called Color Koala:

It spits out five colors at ya and you’re off to the races.

Hue will give you some too. … Read article

The post Re: Pleasing Color Palettes appeared first on CSS-Tricks.

Read more