One Way to Convert Code Indentation

A question:

If you copy a code sample that uses two-space indentation and you want to convert it to four-space indentation, what’s the fastest and easiest option? Matt Stauffer, Twitter I wrote about doing this in Sublime Text a …

The post One Way to Convert Code Indentation appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/one-way-to-convert-code-indentation/

4y | CSS tricks
Stealing Game Animation Techniques to Engage Users

Today’s websites are overflowing with animations—often too many. They get in the way of the content and slow down our busy users. But at the same time: they’re wonderful. They bring websites to life, are fun to implement and …

The post Stealing Game Animation Techniques to Engage Users appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/stealing-game-animation-techniques-to-engage-users/

4y | CSS tricks
Architecting With Next.js

(This is a sponsored post.) Free event hosted by Netlify coming up next week (Wednesday, August 25th): Architecting with Next.js. It’s just a little half-day thing. No brainer.

Join us for a special event where we’ll highlight business

The post Architecting With Next.js appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://www.netlify.com/events/architecting-with-nextjs

4y | CSS tricks
Scrollbar Reflowing

This is a bit of advice for developers on Macs I’ve heard quite a few times, and I’ll echo it: go into System Preferences > General > Show scroll bars and set to always. This isn’t about you, it’s …

The post Scrollbar Reflowing appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/scrollbar-reflowing/

4y | CSS tricks
Introduction to the Solid JavaScript Library

Solid is a reactive JavaScript library for creating user interfaces without a virtual DOM. It compiles templates down to real DOM nodes once and wraps updates in fine-grained reactions so that when state updates, only the related code runs. This …

The post Introduction to the Solid JavaScript Library appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/introduction-to-the-solid-javascript-library/

4y | CSS tricks
Detecting Media Query Support in CSS and JavaScript

You can’t just do @media (prefers-reduced-data: no-preference) alone because, as Kilian Valkhof says:

[…] that would be false if either there was no support (since the browser wouldn’t understand the media query) or if it was supported but the

The post Detecting Media Query Support in CSS and JavaScript appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://kilianvalkhof.com/2021/web/detecting-media-query-support-in-cs

4y | CSS tricks
Native JavaScript Routing?

We can update the URL in JavaScript. We’ve got these APIs: // Adds to browser history history.pushState({}, "About Page", "/about");

// Doesn't history.replaceState({}, "About Page", "/about"); JavaScript is also capable of replacing any content in the DOM. // Hardcore document.body.innerHTML …

The post Native JavaScript Routing? appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/native-javascript-routing/

4y | CSS tricks
“Disambiguating Tailwind”

I appreciated this bit of nuance from a post on Viget’s blog:

There could be a whole article written about the many flavours of Tailwind, but broadly speaking those flavours are:

  1. Stock tailwind, ie. no changes to the

The post “Disambiguating Tailwind” appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/disambiguating-tailwind/

4y | CSS tricks
Creating a Headless WordPress Site With Frontity

Frontity is a WordPress-focused React-based server-side dynamic-rendering framework (phew!) that allows us to create fast headless websites. Chris has a good introduction to Frontity. I guess you could think of it like Next.js for WordPress. And while the demand …

The post Creating a Headless WordPress Site With Frontity appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/creating-headless-wordpress-site-with-frontity/

4y | CSS tricks
The Big Gotcha With Custom Properties

I’ve seen this confuse more than a handful of people recently, including myself, so I’m making sure it’s written down. Let’s chuck a couple of custom properties into CSS: html { --color-1: red; --color-2: blue; } Let’s use them right …

The post The Big Gotcha With Custom Properties appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/the-big-gotcha-with-custom-properties/

4y | CSS tricks

Căutare