Share This
Get in Touch
Scroll Down
//css-tricks.com

Write HTML, the HTML Way (Not the XHTML Way)

You may not use XHTML (anymore), but when you write HTML, you may be more influenced by XHTML than you think. You are very likely writing HTML, the XHTML way. What is the XHTML way of writing HTML, and what is the HTML way of writing HTML? Let’s have a look. HTML, XHTML, HTML In the 1990s, there was HTML. In the 2000s, there was XHTML. Then, in the 2010s, we switched back to HTML. That’s the simple story. You can tell by the rough dates of the specificatio..

Read more
  • 0 Comment

Optimizing SVG Patterns to Their Smallest Size

I recently created a brick wall pattern as part of my #PetitePatterns series, a challenge where I create organic-looking patterns or textures in SVG within 560 bytes (or approximately the size of two tweets). To fit this constraint, I have gone through a journey that has taught me some radical ways of optimizing SVG patterns so that they contain as little code as possible without affecting the overall image quality. I want to walk you through the process and show you how w..

Read more
  • 0 Comment

CSS-Tricks is joining DigitalOcean!

Hey hey! I’ve got a big announcement to make here. (Where’s my gong? I feel like this really needs a good gong hit.) CSS-Tricks, this very website you’re looking at, has been acquired by DigitalOcean! You can hear from them directly on the DigitalOcean blog as well. This will be the most fun if we have a conversation about it, so allow me to kick it off. I’ll pretend to be you at first and then you can be you in the comments. Hey, congrats! ..

Read more
  • 0 Comment

Say Hello to selectmenu, a Fully Style-able select Element

I want to introduce you to a new, experimental form control called <selectmenu>. We’ll get deep into it, including how much easier it is to style than a traditional <select> element. But first, let’s fill in some context about why something like <selectmenu> is needed in the first place, as it’s still evolving and in development. Ask any web developer what they think is missing from the web platform today, chances are the ability to style fo..

Read more
  • 0 Comment

Build Membership Businesses with Memberful

(This is a sponsored post.) What would your business be like if you sold memberships? It might be more than fun to think about, in fact, it might just be transformative. With membership, would you include little add-ons or perks for your biggest fans? Or could it become the entire core of what you do? Likewise, what might you help your clients build? Whatever you decide to do (or perhaps what a client has hired you to do), you can get it done with Memberful. It’s the bes..

Read more
  • 0 Comment

7 Fresh Links on Performance For March 2022

I have a handful of good links to articles about performance that are burning a hole in my bookmarks folder, and wanna drop them here to share. The new WebPageTest website design From fonts to SVG: an icon migration strategy— Erwin Hofman notes that he was using icon fonts out of sheer convenience, but that there are loads of reasons not to use them. He provides details on his new strategy for using icons, which is based on the <use> technique. Five years la..

Read more
  • 0 Comment

How to Make a “Raise the Curtains” Effect in CSS

“Raise the curtains” is what I call an effect where the background goes from dark to light on scroll, and the content on top also goes from light to dark while in a sticky position. Here’s an example where I used the effect on a real-life project: Want to know how it’s done? I will take you behind the curtain and show you how to raise it, with nothing but HTML and CSS. Let’s start with the HTML What we’re making is sort of a simplified “rai..

Read more
  • 0 Comment

CSS Custom Highlight API: The Future of Highlighting Text Ranges on the Web

Styling ranges of text in software is a very useful thing to be able to do. Thankfully, we have the CSS Custom Highlight API to look forward to because it represents the future of styling text ranges on the web. One example: if you’ve ever used text editing software like Google Docs, Word, or Dropbox Paper, you’ll see they detect spelling and grammar errors and displaying nice little squiggly underlines below them to attract attention. Code editors like VS Code..

Read more
  • 0 Comment

Ahmad Shadeed: Use Cases For CSS fit-content

Ahmad Shadeed covers the CSS fit-content sizing keyword. It’s useful! It just doesn’t come up super often. I find myself using min-content a lot more, like when setting up the height of a grid-template-row. The fit-content keyword is actually closely related to min-content and max-content — it just has a little heuristic it follows that Ahmad nicely illustrates as a flow chart. “Use Cases For CSS fit-content” by Ahmad Shadeed My favorite use case is cov..

Read more
  • 0 Comment

IE Down, Edge Up… Global Browser Usage Stats Are for Cocktail Parties and Conference Slides

I enjoy articles like Hartley Charlton’s “Microsoft Edge Looks Set to Overtake Safari as World’s Second Most Popular Desktop Browser.” It’s juicy! We know these massive players in the browser market care very much about their market share, so when one passes another it’s news. Like an Olympic speed skater favored for the gold getting a bronze instead, or the like. Microsoft Edge is now used on 9.54 percent of desktops worldwide, a mere 0.3 percent behind Ap..

Read more
  • 0 Comment
Get in Touch
Close