
With ES Modules, you can natively import other JavaScript. Like confetti, duh: import confetti from 'https://cdn.skypack.dev/canvas-confetti'; confetti(); That import statement is just gonna run. There is a pattern to do it conditionally though. It’s like this: (async () …
The post Dynamic, Conditional Imports appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

In the not-too-distant past, even basic accordion-like interactions required JavaScript event listeners or some CSS… trickery. And, depending on the solution used, editing the underlying HTML could get complicated. Now, the and elements (which combine to form …
The post Two Issues Styling the Details Element and How to Solve Them appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
https://css-tricks.com/two-issues-styling-the-details-element-and-how-to-s

Terence Eden poked around with a way to do footnotes using the / elements. I think it’s kind of clever. Rather than a hyperlink that jumps down to explain the footnote elsewhere, the details are right there next …
The post A (terrible?) way to do footnotes in HTML appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
https://css-tricks.com/a-terrible-way-to-do-footnotes-in-html/

WordPress.com is where you go to use WordPress that is completely hosted for you. You don’t have to worry about anything but building your site. There is a free plan to get started with, and paid plans that offer more …
The post WordPress.com Business Plan (Business-Class WordPress Hosting + Support from WordPress Experts) appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

WordPress.com is where you go to use WordPress that is completely hosted for you. You don’t have to worry about anything but building your site. There is a free plan to get started with, and paid plans that offer more …
The post I Just Wanna Make Sure You Understand the WordPress.com Business Plan appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
https://css-tricks.com/i-just-wanna-make-sure-you-understand-the-wordpress-com-business-plan/

Back when we released the v17 design (we’re on v18 now) of this site. I added html { scroll-behavior: smooth; } to the CSS. Right away, I got comments like this (just one example):
… when you control+f or
…
The post Fixing Smooth Scrolling with Find-on-Page appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
https://css-tricks.com/fixing-smooth-scrolling-with-find-on-page/

Good thinking from Paul Herbert on the Cloudfour blog about colorizing a component. You might look at a design comp and see a card component with a header background of #dddddd, content background of #ffffff, on an overall …
The post Building Flexible Components With Transparency appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
https://cloudfour.com/thinks/building-flexible-components-with-transparency/

Imagine you have a list of items. Say, fruit: Banana, Apple, Orange, Pear, Nectarine We could put those commas (,) in the HTML, but let’s look at how we could do that in CSS instead, giving us an extra level …
The post How to Add Commas Between a List of Items Dynamically with CSS appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
https://css-tricks.com/how-to-add-commas-between-a-list-of-items-dynamically-with-css/

I got a very helpful bug report the other day (thanks Kilian!) about the element in a blog post of mine not showing the default ▶ icon, and thus looking rather like any ol’ random . It …
The post Careful When Changing the Display of summary
appeared first on CSS-Tricks.
You can support CSS-Tricks by being an MVP Supporter.
https://css-tricks.com/careful-when-changing-the-display-of-summary/
Tiffany B. Brown on how Flash paved the way for some things we might think of as fairly modern web technologies:
Flash wasn’t just good for playing multimedia. It was also good for manipulating it. Using ActionScript, you could pan
…
The post Flash’s Web Tech Legacy appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
https://tiffanybbrown.com/2020/12/flash-end-of-life/index.html