
Learn how React Router’s Middleware API fixes leaky redirects and redundant data fetching in protected routes.

A developer’s retrospective on creating an AI video transcription agent with Mastra, an open-source TypeScript framework for building AI agents.

Learn how TanStack DB transactions ensure data consistency on the frontend with atomic updates, rollbacks, and optimistic UI in a simple order manager app.

useEffect mistakesDiscover what’s new in The Replay, LogRocket’s newsletter for dev and engineering leaders, in the November 5th issue.
Would you be interested in joining LogRocket's developer community?
Join LogRocket’s Content Advisory Board. You’ll help inform the type of content we create and get access to exclusive meetups, social accreditation, and swag.
Sign up now
One Reply to "A beginner’s guide to programming for CSS with Sass"
Hey Joe,
First off, thanks for all of the tips here on how to make our CSS more powerful and modular.
I just felt like it is worth noting that in the example of the for loop that the line at the end “$heading-size: $heading-size / 1.25;” will actually make it so that $heading-size remains at the final value before the loop is done. I think this is important because if you have another style right after it something like:
h1.double-size { font-size: $heading-size * 2; }
Then it would not be double the size you are expecting most likely. Do you know if there is a way to have the value reset to it’s original after the loop is finished without making the code too clunky?
Again, this is a great piece and thank you for sharing it!