Hasty Treat - Uses for CSS Variables

Hasty Treat - Uses for CSS Variables

In this Hasty Treat, Scott and Wes talk about CSS variables, a.k.a CSS Custom Properties - why you might want to use them, why they’re better than various preprocessor’s variables, and pitfalls to watch out for and avoid. Kyle Prinsloo’s Freelancing & Beyond — Sponsor Kyle Prinsloo teaches you everything you need to know about freelancing, including how to quit your job, earn a side-income and start taking control of your life. Check it out at https://studywebdevelopment.com/freelancing and use the coupon code “syntax” at checkout to get 25% off. Show Notes 3:25 - What --example-name, represent custom properties called using var() Overwrite with a more specific style Use JavaScript to append .style.setPropert( How are they scoped? Just like normal CSS Can be set on :root {} Can be set on any element down 9:10 - Why Uses: Can make more sense if used semantically var(–accent) vs var(–yellow) Independent values for things that can’t be broken up: box-shadow: 2px 2px 2px 2px red transform: rotate(var(–rotate)) scale(2); Inline properties can be picked up by regular CSS (color, size, etc.) hey Themes that can easily be changed at runtime for entire app 19:15 - Calculations You can use them inside of calc() Animations 20:10 - Bummers Not super well supported just yet (IE 11) No good fallback other than manual fallback Syntax - Old Browsers, Fallbacks and Polyfills series Part 1 Part 2 Part 3 PostCSS Custom Properties Tweet us your tasty treats! Scott’s Instagram LevelUpTutorials Instagram Wes’ Instagram Wes’ Twitter Wes’ Facebook Scott’s Twitter Make sure to include @SyntaxFM in your tweets

Jaksot(974)

950: Even SCARIER Web Dev Nightmares (Spooky Stories Pt. 2)

950: Even SCARIER Web Dev Nightmares (Spooky Stories Pt. 2)

In part 2 of this year’s Spooky Stories special, Wes and Scott discuss the most chilling developer horror stories—from six-month-old unprocessed donations and runaway dog-food orders to vanishing data...

29 Loka 202557min

949: Web Dev HORROR Stories + Spooky Trivia! (Spooky Stories Pt. 1)

949: Web Dev HORROR Stories + Spooky Trivia! (Spooky Stories Pt. 1)

It’s that time of year again, Scott (as Dracula) and Wes (as a big bad shark) return for their annual Spooky Stories special! They’re joined by a mysterious guest for a round of creepy coding trivia a...

27 Loka 202540min

948: Zed is Ready For Primetime

948: Zed is Ready For Primetime

Wes and Scott talk about what makes Zed—the hot new editor built in Rust—fast, beautiful, and finally ready for primetime. From Git UI to extensions and AI tools, they break down what Zed gets right, ...

22 Loka 202553min

947: S-Tier MCP Servers for Developers

947: S-Tier MCP Servers for Developers

Scott and Wes break down the top-tier MCP servers developers are using right now. From browser automation to debugging superpowers, they explore how these servers are changing what’s possible in moder...

20 Loka 202532min

946: We Got Roasted for Our Websites — Fair

946: We Got Roasted for Our Websites — Fair

In this potluck episode of Syntax, Wes and Scott answer your questions about why devs neglect their own websites, hosting shady projects (hypothetically), AI rules in version control, balancing side p...

15 Loka 202557min

945: Chrome Dev Tools MCP Server

945: Chrome Dev Tools MCP Server

Scott and Wes dive into Chrome’s new MCP server; a dev tools API powered by Puppeteer that gives your scripts, editors, and AI agents full access to Chrome. They break down how it works, what it can (...

13 Loka 202529min

944: Is Coinbase Really Writing Half Their Code With AI?

944: Is Coinbase Really Writing Half Their Code With AI?

Wes and Scott talk with Kyle Cesmat about how Coinbase is writing nearly half its code with AI—while keeping quality and security front and center. They dig into tools like Cursor and Claude Code, age...

8 Loka 202549min

943: Modern React with Ricky Hanlon (React Core Dev)

943: Modern React with Ricky Hanlon (React Core Dev)

Scott and Wes sit down with Ricky Hanlon from the React core team at Facebook to dive into the latest features and APIs shaping modern React development. From transitions and Suspense to fetching stra...

6 Loka 202538min

Suosittua kategoriassa Politiikka ja uutiset

aikalisa
tervo-halme
rss-ootsa-kuullut-tasta
ootsa-kuullut-tasta-2
politiikan-puskaradio
viisupodi
rss-vaalirankkurit-podcast
otetaan-yhdet
et-sa-noin-voi-sanoo-esittaa
rss-podme-livebox
io-techin-tekniikkapodcast
linda-maria
rikosmyytit
rss-tasta-on-kyse-ivan-puopolo-verkkouutiset
rss-asiastudio
the-ulkopolitist
rss-uusi-juttu
rss-fi-lainsaadanto-paremmaksi
rss-hyvaa-huomenta-bryssel
rss-50100-podcast