Aspect Ratio Media Elements and intrinsicsize

If you need an aspect-ratio sized <div> (or any element that can have children), you can do it. Perhaps the cleanest way is a custom-property-sized pseudo-element that pushes the correct minimum height through padding-based-on-width.

But media elements like <img> don’t have children. The <video> tag isn’t self-closing, but when it is supported (almost always), the content of it is replaced with a shadow DOM you don’t control. Besides, these are the only two elements that “size to an external …

The post Aspect Ratio Media Elements and intrinsicsize appeared first on CSS-Tricks.

Read more

Gutenberg 3.8 Released, Adds Full Screen Mode

Gutenberg 3.8 is available for download. This release features a full screen mode that hides both the admin bar and the menu. Unlike previous versions of Distraction-Free-Writing mode where things would fade in and out of view, these two items stay hidden until full-screen mode is disabled. User Interface elements (more…)
Read more

5 Tricks to Write Eye-Catching Titles That Make Your WordPress Site Viral

With great chefs, there is always that secret ingredient that turns their dish into a masterpiece. The same goes in the world of blogging. A title is an essential ingredient that will help you drive more traffic to your WordPress site. It is one thing to come up with fantastic content, but it’s another thing …
The post 5 Tricks to Write Eye-Catching Titles That Make Your WordPress Site Viral appeared first on Torque.
Read more

Removing jQuery from GitHub.com frontend

Here’s how and why the team at GitHub has slowly been deprecating jQuery from their codebase:

We have recently completed a milestone where we were able to drop jQuery as a dependency of the frontend code for GitHub.com. This marks the end of a gradual, years-long transition of increasingly decoupling from jQuery until we were able to completely remove the library. In this post, we will explain a bit of history of how we started depending on jQuery in the …

The post Removing jQuery from GitHub.com frontend appeared first on CSS-Tricks.

Read more

HTML elements, unite! The Voltron-like powers of combining elements.

Guides, resources and discussions about Semantic HTML are often focused around specific elements, like a heading, or a sectioning element, or a list. It’s not often that we talk specifically about how we can combine HTML elements to increase their effectiveness.

Normally, when we introduce HTML, we talk about how it is used to apply meaning to content in a document, and we do this by using examples like:

  • “Is it a paragraph?”
  • “Is it a heading?”
  • “Is it a

The post HTML elements, unite! The Voltron-like powers of combining elements. appeared first on CSS-Tricks.

Read more

Why Designers Don’t Want to Think When They Read

We’ve all seen articles like “The Top 5 Ways To Fix Your Sign Up Flow and Get On With Your Life.” Articles like this aren’t wrong or bad, they are just shallow and a bit junk food-y and BuzzFeed-y. Of course, a designer’s actual job is complicated, nuanced, and difficult. But deep dives into all that are far less common.

Khoi Vinh has been writing about this and points to some heavy self-reflection from Fabricio Teixeira and Caio Braga, publishers …

The post Why Designers Don’t Want to Think When They Read appeared first on CSS-Tricks.

Read more

40+ Stunning Food, Drink & Packaging Design Mockups

Part of your job as a designer is to make sure you present your final design to your clients in a way that they expect (and that makes your hard work shine!). Clearly, they will want to see how your design looks and feels on their actual product — that’s where product mockups can be […]
Read more