> All in One 586

Ads

Monday, April 20, 2026

Mostly Clear today!



With a high of F and a low of 41F. Currently, it's 57F and Clear outside.

Current wind speeds: 4 from the Southeast

Pollen: 0

Sunrise: April 20, 2026 at 06:07PM

Sunset: April 21, 2026 at 07:34AM

UV index: 0

Humidity: 15%

via https://ift.tt/8nJpqYP

April 21, 2026 at 10:02AM

Markdown + Astro = ❤️

Markdown is a great invention that lets us write less markup. It also handles typographical matters like converting straight apostrophes (') to opening or closing quotes (' or ') for us.

Although Astro has built-in support for Markdown via .md files, I’d argue that your Markdown experience can be enhanced in two ways:

  1. MDX
  2. Markdown Component

I’ve cover these in depth in Practical Astro: Content Systems.

We’re going to focus on MDX today.

MDX

MDX is a superset of Markdown. It lets you use components in Markdown and simple JSX in addition to all other Markdown features.

For Astro, you can also use components from any frontend framework that you have installed. So you can do something like:

---
# Frontmatter...
---

import AstroComp from '@/components/AstroComp.astro'
import SvelteComp from '@/components/AstroComp.astro'

<AstroComp> ... </AstroComp>
<SvelteComp> ... </SvelteComp>

It can be a great substitute for content-heavy stuff because it lets you write markup like the following.

<div class="card">
  ### Card Title

  Content goes here

  - List
  - Of
  - Items

  Second paragraph
</div>

Astro will convert the MDX into the following HTML:

<div class="card">
  <h2>Card Title</h2>

  <p>Content goes here </p>

  <ul>
    <li> List </li>
    <li> Of </li>
    <li> Items </li>
  </ul>

  <p>Second paragraph</p>
</div>

Notice what I did above:

  • I used ## instead of a full h2 tag.
  • I used - instead of <ul> and <li> to denote lists.
  • I didn’t need any paragraph tags.

Writing the whole thing in HTML directly would have been somewhat of a pain.

Installing MDX

Astro folks have built an integration for MDX so it’s easy-peasy to add it to your project. Just follow these instructions.

Three Main Ways to Use MDX

These methods also work with standard Markdown files.

  1. Import it directly into an Astro file
  2. Through content collections
  3. Through a layout

Import it Directly

The first way is simply to import your MDX file and use it directly as a component.

---
import MDXComp from '../components/MDXComp.mdx'
---

<MDXComp />

Because of this, MDX can kinda function like a partial.

Through Content Collections

First, you feed your MDX into a content collection. Note that you have to add the mdx pattern to your glob here.

Import it directly

The first way is simply to import your MDX file and use it directly as a component.

// src/content.config.js
import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';

const blog = defineCollection({
  loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/blog" }),
});

export const collections = { blog };

Then you retrieve the MDX file from the content collection.

---
import { getEntry, render } from 'astro:content'
const { slug } = Astro.props
const post = await getEntry('blog', slug)
const { Content } = await render(post)
---

<Content />

As you’re doing this, you can pass components into the MDX files so you don’t have to import them individually in every file.

For example, here’s how I would pass the Image component from Splendid Labz into each of my MDX files.

---
import { Image } from '@splendidlabz/astro'
// ...
const { Content } = await render(post)
const components = { Image }
---

<Content {components} />

In my MDX files, I can now use Image without importing it.

<Image src="..." alt="..." />

Use a Layout

Finally, you can add a layout frontmatter in the MDX file.

---
title: Blog Post Title
layout: @/layouts/MDX.astro
---

This layout frontmatter should point to an Astro file.

In that file:

  • You can extract frontmatter properties from Astro.props.content.
  • The MDX content can be rendered with <slot>.
---
import Base from './Base.astro'
const props = Astro.props.content
const { title } = props
---

<Base>
  <h1>{title}</h1>
  <slot />
</Base>

Caveats

Formatting and Linting Fails

ESLint and Prettier don’t format MDX files well, so you’ll end up manually indenting most of your markup.

This is fine for small amounts of markup. But if you have lots of them… then the Markdown Component will be a much better choice.

More on that in another upcoming post.

RSS Issues

The Astro RSS integration doesn’t support MDX files out of the box.

Thankfully, this can be handled easily with Astro containers. I’ll show you how to do this in Practical Astro.

Taking it Further

I’ve been building with Astro for 3+ years, and I kept running into the same friction points on content-heavy sites: blog pages, tag pages, pagination, and folder structures that get messy over time.

So I built Practical Astro: Content Systems, 7 ready-to-use solutions for Astro content workflows (MDX is just one of them). You get both the code and the thinking behind it.

If you want a cleaner, calmer content workflow, check it out.

I also write about Astro Patterns and Using Tailwind + CSS together on my blog. Come by and say hi!


Markdown + Astro = ❤️ originally handwritten and published with love on CSS-Tricks. You should really get the newsletter as well.



from CSS-Tricks https://ift.tt/WOTlj0d
via IFTTT

Sunday, April 19, 2026

Clear today!



With a high of F and a low of 30F. Currently, it's 48F and Clear outside.

Current wind speeds: 8 from the Southeast

Pollen: 0

Sunrise: April 19, 2026 at 06:08PM

Sunset: April 20, 2026 at 07:33AM

UV index: 0

Humidity: 16%

via https://ift.tt/Qu6d3yK

April 20, 2026 at 10:02AM

Saturday, April 18, 2026

Mostly Clear today!



With a high of F and a low of 27F. Currently, it's 37F and Clear outside.

Current wind speeds: 3 from the Southwest

Pollen: 0

Sunrise: April 18, 2026 at 06:09PM

Sunset: April 19, 2026 at 07:32AM

UV index: 0

Humidity: 23%

via https://ift.tt/WQ6g0rq

April 19, 2026 at 10:02AM

Friday, April 17, 2026

Mostly Clear today!



With a high of F and a low of 20F. Currently, it's 31F and Fair outside.

Current wind speeds: 7 from the Northwest

Pollen: 0

Sunrise: April 17, 2026 at 06:11PM

Sunset: April 18, 2026 at 07:31AM

UV index: 0

Humidity: 72%

via https://ift.tt/k4oiOTB

April 18, 2026 at 10:02AM

What’s !important #9: clip-path Jigsaws, View Transitions Toolkit, Name-only Containers, and More

This issue of What’s !important brings you clip-path jigsaws, a view transitions toolkit, name-only containers, the usual roundup of new, notable web platform features, and more.

Creating a jigsaw puzzle using clip-path

Amit Sheen demonstrated how to create a full jigsaw puzzle using clip-path. While I doubt that you’ll need to create a jigsaw puzzle anytime soon, Amit’s walkthrough offers a fantastic way to acquaint yourself with this evolving CSS property that’s becoming more and more popular every day.

For example, Chrome Canary shipped rounded clip-path polygons only last week:

I and Jason are currently working on implementing the CSS `polygon() round` keyword in Chrome. This is one of my favorite CSS features! Thanks to @lea.verou.me for bringing it to CSS. Enable the `enable-experimental-web-platform-features` flag in Chrome Canary codepen.io/yisi/pen/NPR…

[image or embed]

— yisibl.bsky.social (@yisibl.bsky.social) Apr 9, 2026 at 7:25

And there’s also talk of implementing other corner-shape keywords such as bevel, too.

Finally, since we’re on the topic, and because I somehow completely missed it for What’s !important #8, here’s Karl Koch demonstrating some really neat clip-path animations.

Get clippin’!

View transitions toolkit

The Chrome DevRel team created a view transitions toolkit, a collection of utilities that make working with view transitions a bit easier.

Here’s my favorite demo from the site:

Chrome shipped element-scoped view transitions only last month, so there’s no better time to dive into this toolkit.

How name-only containers can be used for scoping

Chris Coyier discussed the use of name-only containers for scoping, and how they compare to class names and @scope. Personally, I prefer @scope because it tends to result in cleaner HTML, and it seems that Chris has updated his stance to be more @scope-aligned too, but it really comes down to personal preference. What’s your take on it?

Hey, remember subgrid?

At one point, subgrid was one of the most highly-anticipated CSS features, but it’s been two and half years since it became Baseline Newly Available, and it’s barely made a dent in the CSS landscape. This is a shame, because subgrid can help us to break out of grids properly and avoid the ‘ol Michael Scofield/nested wrappers/negative margins extravaganza.

But don’t worry, David Bushell’s very simple explanation of subgrid has you covered.

A subgrid-powered web layout featuring Lorem Ipsum placeholder text and some images. Red vertical alignment markers depict the grid columns.
Source: David Bushell (although the red grid lines were added by me).

You Might Not Need…JavaScript?

Remember You Might Not Need jQuery? Pavel Laptev’s The Great CSS Expansion has a similar vibe, noting CSS alternatives to JavaScript libraries (and JavaScript in general) that are smaller and more performant.

A screenshot of a technical article featuring the Anchor Positioning heading, a comparison table of JavaScript libraries for anchor positioning, and a CSS code example.

Missed hits

It’s becoming increasingly difficult to keep up with all of these new CSS features. I attempted way too many rounds of Keith Cirkel’s new CSS or BS? quiz, and my best score was only 18/20. Sad times. Let me know your score in the comments (unless it’s higher than mine…).

A screenshot from an online quiz titled CSS or BS? showing the CSS property font-synthesis in a speech bubble, with buttons to select whether the property is real or fake.

What’s !important #9: clip-path Jigsaws, View Transitions Toolkit, Name-only Containers, and More originally handwritten and published with love on CSS-Tricks. You should really get the newsletter as well.



from CSS-Tricks https://ift.tt/gvCQm1a
via IFTTT

Thursday, April 16, 2026

Partly Cloudy today!



With a high of F and a low of 34F. Currently, it's 62F and Clear outside.

Current wind speeds: 15 from the Southwest

Pollen: 0

Sunrise: April 16, 2026 at 06:12PM

Sunset: April 17, 2026 at 07:30AM

UV index: 0

Humidity: 14%

via https://ift.tt/Wo48aH2

April 17, 2026 at 10:02AM

Mostly Clear today!

With a high of F and a low of 41F. Currently, it's 57F and Clear outside. Current wind speeds: 4 from the Southeast Pollen: 0 Su...