<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mike Sandula</title>
    <description>The latest articles on DEV Community by Mike Sandula (@msandula12).</description>
    <link>https://dev.to/msandula12</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2027834%2F3d7e18c9-4692-4a11-a1bc-e6675fbd905d.jpeg</url>
      <title>DEV Community: Mike Sandula</title>
      <link>https://dev.to/msandula12</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/msandula12"/>
    <language>en</language>
    <item>
      <title>Climbing the software engineering ranks: Going from senior to staff</title>
      <dc:creator>Mike Sandula</dc:creator>
      <pubDate>Fri, 19 Dec 2025 18:00:03 +0000</pubDate>
      <link>https://dev.to/msandula12/climbing-the-software-engineering-ranks-going-from-senior-to-staff-28m4</link>
      <guid>https://dev.to/msandula12/climbing-the-software-engineering-ranks-going-from-senior-to-staff-28m4</guid>
      <description>&lt;p&gt;&lt;em&gt;This is Part 2 of a two-part series.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;My &lt;a href="https://dev.to/msandula12/climbing-the-software-engineering-ranks-going-from-mid-to-senior-1fi"&gt;last post&lt;/a&gt; was about actionable steps mid-level software engineers can take to become senior software engineers. This time around, I’ll share some steps you can take to go from senior to staff.&lt;/p&gt;

&lt;p&gt;I didn’t say it explicitly before, but I think being a senior engineer is about being a leader within the engineering organization; staff engineers, by contrast, bring that same focus and attention to all organizations throughout the company. They act as expert-level liaisons between engineering and design, product, and other teams. With that said…&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Become a technical expert&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The primary expectation of a staff-level engineer is deep technical proficiency. One of the steps I mentioned for becoming senior was to “share the knowledge”. That should continue to include small things—various learnings, brief posts about “why I’d like to make these changes”—but staff engineers also need to tackle issues of ever-increasing size and scope. Architectural changes, large refactors, introducing patterns or dependencies.&lt;/p&gt;

&lt;p&gt;Your company may or may not have a formal culture around these things, but even if it’s not explicitly required, I strongly recommend writing things down and putting them out there.&lt;/p&gt;

&lt;p&gt;Communication skills become increasingly important as you move up the engineering ladder, and writing is one of the main ways you’ll communicate. Writing helps you think through complex problems and serves as invaluable documentation. I once wrote up a spec on how we should reorganize the file and folder structure of our codebase. It explained the benefits of the proposed approach, why I chose one pattern over another, and the steps needed to get us from A to B. The team was able to review it, weigh in, and once I had buy-in, I completed the work through a few focused PRs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make yourself available&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mentorship is a key component of being senior/staff. It’s common for people to continue spinning their wheels rather than ask for help, but you can be proactive. When a team member says they’re blocked or struggling during standup, try asking, “Want to jump on a call after this meeting?”&lt;/p&gt;

&lt;p&gt;One way to bring junior engineers into the fold is to involve them in areas where you’re the domain expert. Did you recently refactor your codebase’s state management and now a bug has popped up? Offer it up to another engineer and let them know you’d be happy to pair. As the more senior engineer, who’s most familiar with that bit of work, you could likely fix it faster on your own, but that doesn’t help your team grow.&lt;/p&gt;

&lt;p&gt;As an aside, this approach avoids information silos. When only one person understands a critical piece of code, it becomes a black box, and that’s risky if that person moves to another project—or another company altogether.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Find ways to collaborate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Regardless of what department they’re listed under on the org chart, staff-level employees effectively belong to the whole company. They’re expert engineers/designers/project managers who can interface with other departments on behalf of their own.&lt;/p&gt;

&lt;p&gt;Working on a design system—if you have one, or creating one if you don’t—is the ideal way to collaborate with designers. Think about your company’s product the same way your product team does by asking thoughtful questions during requirements gathering and refinement. When non-engineers think of “someone from engineering”, you want that someone to be you.&lt;/p&gt;

&lt;p&gt;If you’re in the middle of your engineering journey and looking ahead, I hope these guides offer some practical steps you can take to level up your career.&lt;/p&gt;

</description>
      <category>career</category>
      <category>software</category>
      <category>programming</category>
      <category>careerdevelopment</category>
    </item>
    <item>
      <title>Climbing the software engineering ranks: Going from mid to senior</title>
      <dc:creator>Mike Sandula</dc:creator>
      <pubDate>Fri, 19 Dec 2025 17:58:02 +0000</pubDate>
      <link>https://dev.to/msandula12/climbing-the-software-engineering-ranks-going-from-mid-to-senior-1fi</link>
      <guid>https://dev.to/msandula12/climbing-the-software-engineering-ranks-going-from-mid-to-senior-1fi</guid>
      <description>&lt;p&gt;&lt;em&gt;This is Part 1 of a two-part series.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Going from a junior- to a mid-level software engineer has always been fairly straightforward: gain experience and competency by fulfilling your day-to-day tasks. You should be able to handle any engineering work you’re assigned. Your manager should be using words like “reliable” and “efficient” to describe you, meaning you deliver mostly bug-free work in a timely manner.&lt;/p&gt;

&lt;p&gt;Once you reach mid-level, however, it becomes harder and harder to continue leveling up. Here are a few things you can do to help yourself stand out. Keep in mind it’s important to keep doing what you’re already doing, so these should be in addition to, not in place of, your existing responsibilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Find small things to fix/improve&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every software company has tech debt and bottlenecks that everyone knows and complains about, yet they persist simply due to inertia. Seek those things out, fix them, and your coworkers will thank you. Examples include fixing console warnings, stabilizing flaky tests, or improving the run time of your test suite. The kind of work that won’t get assigned in a ticket and so it slips between the cracks, but that can make real quality of life improvements for the engineering team.&lt;/p&gt;

&lt;p&gt;You can gain plenty of knowledge and experience by doing the typical engineering work of features and bug fixes, but once you begin exploring the edges of your codebase and the systems that support it, you’ll naturally begin to operate at a more senior level.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update your dependencies&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At my current job, I started an initiative to track which dependencies were out of date and work toward reducing that number. Again, this is the kind of tech debt that’s easy to let slide, but it can have implications beyond the engineering team. Updated dependencies means you’re getting security fixes (your Dev Ops team will thank you) as well as new features you can take advantage of (looking at you, Product).&lt;/p&gt;

&lt;p&gt;Once again, this also helps you personally as an engineer. When you encounter breaking changes while upgrading, it’ll force you to read through the docs and understand the changes. Maybe something you used to struggle with will suddenly click. Maybe you’ll realize you don’t even need that dependency (in my case, I found over two dozen dependencies that were no longer even being used). Or maybe you could become the person who’s trusted with deciding whether to use Package A or Package B.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Take ownership of something&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Become the owner and/or domain expert of some facet of your codebase. Maybe your team lacks shared formatting and linting standards. Maybe you use GraphQL (or any other technology) but no one knows the best practices. Or maybe there’s some pattern or abstraction you can introduce to improve consistency and maintainability.&lt;/p&gt;

&lt;p&gt;Once people see you as the go-to person for something, you start to become indispensable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Share the knowledge&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you do any of the above things, it’s important to share what you’ve learned, whether through Slack updates, documentation, or both. Never in a braggy or show-off way, but for purposes of knowledge sharing—although, yes, doing this can go a long way toward demonstrating seniority. As an added bonus, explaining things always forces you to have a deeper understanding of those things.&lt;/p&gt;

&lt;p&gt;And that gets at what being senior is all about. Over time, it becomes less about your ability to produce great code. That should be a given. Senior engineers are leaders, and that means leading by example and thinking beyond the normal day to day, focusing on the long-term health of their team.&lt;/p&gt;

</description>
      <category>career</category>
      <category>software</category>
      <category>programming</category>
      <category>careerdevelopment</category>
    </item>
    <item>
      <title>Separating ourselves from the separation of concerns</title>
      <dc:creator>Mike Sandula</dc:creator>
      <pubDate>Fri, 31 Jan 2025 13:51:15 +0000</pubDate>
      <link>https://dev.to/msandula12/separating-ourselves-from-the-separation-of-concerns-2i0e</link>
      <guid>https://dev.to/msandula12/separating-ourselves-from-the-separation-of-concerns-2i0e</guid>
      <description>&lt;p&gt;I like to cook, but I always find the following type of instruction frustrating:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Once the onions have softened, add the cumin, oregano, and chili powder.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;How &lt;em&gt;much&lt;/em&gt; cumin, oregano, and chili powder? I have to flip back to the ingredients list to check. I’d much rather see:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Once the onions have softened, add the cumin (2 Tbsp.), oregano (1 Tbsp.), and chili powder (1/2 Tbsp.).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This would save me from bouncing between the ingredients and instructions, especially if I’m using my phone. Even with a physical cookbook, the constant context switching breaks my flow—a problem familiar to software engineers.&lt;/p&gt;

&lt;p&gt;This is similar to another problem familiar to software engineers: the separation of concerns. The separation of concerns is a design principle that suggests keeping distinct aspects of a system separate for clarity, such as the Model-View Controller pattern where data (the model) is kept separate from the UI (the view), with a controller in the middle linking the two. &lt;/p&gt;

&lt;p&gt;When React introduced JSX, there were &lt;em&gt;concerns&lt;/em&gt; that this syntax violated this principle. In time, however, most came to see that JSX only violated a separation of &lt;em&gt;technologies&lt;/em&gt;. I had a similar aversion to Tailwind the first time I used it—I still don’t &lt;em&gt;love&lt;/em&gt; it—but I definitely don’t miss always needing a CSS file open in addition to its corresponding JSX/TSX file. &lt;/p&gt;

&lt;p&gt;Makes you wonder whether there are any other "separations of concerns"—in coding, cooking, or anything else—that are false distinctions we’ve been clinging to.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using pow() and sqrt() in CSS to make shapes with shapes</title>
      <dc:creator>Mike Sandula</dc:creator>
      <pubDate>Thu, 12 Sep 2024 18:32:16 +0000</pubDate>
      <link>https://dev.to/msandula12/using-pow-and-sqrt-in-css-to-make-shapes-with-shapes-1ma0</link>
      <guid>https://dev.to/msandula12/using-pow-and-sqrt-in-css-to-make-shapes-with-shapes-1ma0</guid>
      <description>&lt;p&gt;If you’ve been writing CSS for a while, there's a good chance you've used the &lt;code&gt;calc()&lt;/code&gt; function before. One such use case would be when you want to make the width of an element be the width of the page minus some distance, e.g., &lt;code&gt;width: calc(100vw - 16px);&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But did you know that CSS now has other math functions, such as &lt;code&gt;pow()&lt;/code&gt; and &lt;code&gt;sqrt()&lt;/code&gt;? These functions were introduced in December 2023 and have &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Baseline/Compatibility" rel="noopener noreferrer"&gt;baseline compatibility&lt;/a&gt;. They work the same as JavaScript's &lt;code&gt;Math.pow()&lt;/code&gt; and &lt;code&gt;Math.sqrt()&lt;/code&gt; but without the &lt;code&gt;Math&lt;/code&gt; prefix.&lt;/p&gt;

&lt;p&gt;Let's see how we can make use of them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making shapes with shapes
&lt;/h2&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/msandula/embed/abgxdYq?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In this CodePen, I have a circle, a triangle, and a square, each traveling a path in the shape of itself around its origin. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv4lr6xbt08usgdnz95wp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv4lr6xbt08usgdnz95wp.png" alt="A circle, a triangle, and a square." width="800" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The circle and the square don’t require anything too fancy (I won't delve into it here, but you can check out the code for yourself) but the math is a bit more involved for the triangle. The animation needs to move among the three points of the triangle. In order to do this, we need the X, Y coordinates of each point, where the center is at (0, 0). These points are represented by the red dots in this image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjyyxtv0e62miqezud3b9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjyyxtv0e62miqezud3b9.png" alt="A triangle on a Cartesian graph where its center is at (0, 0)." width="582" height="588"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The X coordinates are pretty straightforward: The top dot is at 0, and the bottom two dots are each &lt;code&gt;n / 2&lt;/code&gt; away from 0, where &lt;code&gt;n&lt;/code&gt; equals the length of each side. For example, if &lt;code&gt;n&lt;/code&gt; is &lt;code&gt;16px&lt;/code&gt;, then their X coordinates would be &lt;code&gt;-8px&lt;/code&gt; and &lt;code&gt;8px&lt;/code&gt;, respectively.&lt;/p&gt;

&lt;p&gt;Figuring out the Y coordinates is where things get just a bit more complicated. We'll need to first figure out the height of the triangle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxg0s6qf76ne6n9qqlyxm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxg0s6qf76ne6n9qqlyxm.png" alt="An equilateral triangle with sides of length " width="732" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To do that, we'll need the Pythagorean theorem which, as you may recall from geometry class, is A² + B² = C².&lt;/p&gt;

&lt;p&gt;The C in this case is &lt;code&gt;n&lt;/code&gt; since that's the longest side, and A is half the length of &lt;code&gt;n&lt;/code&gt;, or &lt;code&gt;n / 2&lt;/code&gt;. To get B, which represents the height, we need the square root of &lt;code&gt;n²&lt;/code&gt; minus &lt;code&gt;(n / 2)²&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;I'm using a CSS variable called &lt;code&gt;--size&lt;/code&gt; to represent &lt;code&gt;n&lt;/code&gt;. Note that I also have a variable called &lt;code&gt;--size-with-unit&lt;/code&gt;. I have a slider that lets you adjust the size from &lt;code&gt;1rem&lt;/code&gt; to &lt;code&gt;5rem&lt;/code&gt;, with a default value of &lt;code&gt;3rem&lt;/code&gt;. I'm mostly using the &lt;code&gt;--size-with-unit&lt;/code&gt; variable throughout my CSS, but these math functions require a plain numeric value. It was easier to have two separate variables rather than worry about adding or removing units in place.&lt;/p&gt;

&lt;p&gt;We'll use the &lt;code&gt;pow()&lt;/code&gt; function for squaring values (This function is actually an exponential function that takes in two numbers: a base number and its exponent. When squaring a number, the second parameter will always be &lt;code&gt;2&lt;/code&gt;.) and the &lt;code&gt;sqrt()&lt;/code&gt; function for calculating the square root. We'll save our calculation to a &lt;code&gt;--height&lt;/code&gt; variable, which looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.triangle&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="m"&gt;1rem&lt;/span&gt; &lt;span class="err"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sqrt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--size&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;-&lt;/span&gt; &lt;span class="n"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--size&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;/&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since we're traveling relative to our center origin, we'll go either half the distance of our height upwards or downwards. We'll save this to a variable called &lt;code&gt;--midpoint&lt;/code&gt;, which is equal to &lt;code&gt;calc(var(--height) / 2)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now we have our X, Y coordinates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;(-(size / 2), -midpoint)&lt;/li&gt;
&lt;li&gt;(0, midpoint)&lt;/li&gt;
&lt;li&gt;(size / 2, -midpoint)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Put it all together, and now our triangle can, well, triangulate (while the circle circulates and the square ... does its thing)!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnkaeu94mtu8aw0m0v6js.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnkaeu94mtu8aw0m0v6js.gif" alt="A GIF of a circle going in a circle, a triangle going in a triangle, and a square going in a square." width="600" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This was a contrived example, of course, but hopefully you can see the &lt;code&gt;pow&lt;/code&gt;-er of these new CSS functions 😆. Good luck and happy coding!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: In case you're curious, I used &lt;a href="https://excalidraw.com" rel="noopener noreferrer"&gt;Excalidraw&lt;/a&gt; to create the images in this post.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to create typography tokens for a design system using Sass mixins</title>
      <dc:creator>Mike Sandula</dc:creator>
      <pubDate>Wed, 04 Sep 2024 20:13:29 +0000</pubDate>
      <link>https://dev.to/msandula12/how-to-create-typography-tokens-for-a-design-system-using-sass-mixins-5elb</link>
      <guid>https://dev.to/msandula12/how-to-create-typography-tokens-for-a-design-system-using-sass-mixins-5elb</guid>
      <description>&lt;p&gt;A lot of design systems start out with basic design tokens for things like colors and sizes, which can be easily translated into CSS variables (or Sass, or Less, etc.).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// tokens.scss&lt;/span&gt;
&lt;span class="nv"&gt;$primary-text-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#aaa&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$secondary-text-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#ccc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;$size-s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$size-m&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// some-component.scss&lt;/span&gt;
&lt;span class="nc"&gt;.some-component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$primary-text-color&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$size-s&lt;/span&gt; &lt;span class="nv"&gt;$size-m&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nt"&gt;h4&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$secondary-text-color&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next logical addition to your collection of tokens is fonts. And while you &lt;em&gt;can&lt;/em&gt; apply the above pattern to fonts, most designers I’ve ever encountered think about typography as a whole. The font and its weight influence its size and line-height — it’s all a package deal.&lt;/p&gt;

&lt;p&gt;In other words, typography is treated as a &lt;em&gt;class&lt;/em&gt;. This is a great use case for a Sass (or Less) &lt;a href="https://sass-lang.com/documentation/at-rules/mixin/" rel="noopener noreferrer"&gt;mixin&lt;/a&gt; (unfortunately, there’s currently no equivalent in native CSS).&lt;/p&gt;

&lt;p&gt;Here’s an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// tokens.scss&lt;/span&gt;
&lt;span class="nv"&gt;$font-sans-serif&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Aria&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Helvetica&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;$size-s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$size-m&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$size-l&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$size-xl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;48px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;@mixin&lt;/span&gt; &lt;span class="nf"&gt;heading-sans-serif-l&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$font-sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$size-l&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;700&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="mi"&gt;.3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@mixin&lt;/span&gt; &lt;span class="nf"&gt;heading-sans-serif-xl&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$font-sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$size-xl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;700&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="mi"&gt;.4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// some-component.scss&lt;/span&gt;
&lt;span class="k"&gt;@use&lt;/span&gt; &lt;span class="s2"&gt;"tokens"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nc"&gt;.some-component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="nt"&gt;h2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;@include&lt;/span&gt; &lt;span class="nd"&gt;tokens&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heading-sans-serif-xl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$size-l&lt;/span&gt; &lt;span class="nv"&gt;$size-xl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nt"&gt;h3&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;@include&lt;/span&gt; &lt;span class="nd"&gt;tokens&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;heading-sans-serif-l&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$size-s&lt;/span&gt; &lt;span class="nv"&gt;$size-m&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   
    &lt;span class="p"&gt;}&lt;/span&gt;   
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every &lt;code&gt;h2&lt;/code&gt; and &lt;code&gt;h3&lt;/code&gt; within any component with the &lt;code&gt;some-component&lt;/code&gt; class will get &lt;em&gt;all&lt;/em&gt; of the styles defined within its included mixin — font-family, font-size, font-weight, line-height — and we’re free to extend it by adding in some padding (you &lt;a href="https://sass-lang.com/documentation/at-rules/use/" rel="noopener noreferrer"&gt;import&lt;/a&gt; from an outside file by using &lt;code&gt;@use&lt;/code&gt;). You could also overwrite any of the mixin values, if necessary (or if you want to make a designer’s eyes twitch).&lt;/p&gt;

&lt;p&gt;This is the approach I took when building out a design system at &lt;a href="//Dictionary.com"&gt;Dictionary.com&lt;/a&gt;. It definitely helped streamline the redesign effort of our home (&lt;a href="//Thesaurus.com"&gt;Thesaurus.com&lt;/a&gt;, too!) and browse pages (&lt;a href="https://www.dictionary.com/browse/light" rel="noopener noreferrer"&gt;/browse/light&lt;/a&gt; is the quintessential example), which launched earlier this year.&lt;/p&gt;

&lt;p&gt;Leverage mixins to create powerful building blocks within your design system.&lt;/p&gt;

</description>
      <category>css</category>
      <category>sass</category>
      <category>designsystem</category>
    </item>
  </channel>
</rss>
