<?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>Forem: Szymon Sadowski</title>
    <description>The latest articles on Forem by Szymon Sadowski (@szymonsadowski).</description>
    <link>https://forem.com/szymonsadowski</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%2F1010041%2Fffca3bbf-97ca-4f92-b6d4-47fd5aabc109.png</url>
      <title>Forem: Szymon Sadowski</title>
      <link>https://forem.com/szymonsadowski</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/szymonsadowski"/>
    <language>en</language>
    <item>
      <title>Holiday gift guide for the Developer in your life</title>
      <dc:creator>Szymon Sadowski</dc:creator>
      <pubDate>Tue, 05 Dec 2023 17:55:44 +0000</pubDate>
      <link>https://forem.com/szymonsadowski/holiday-gift-guide-for-the-developer-in-your-life-1368</link>
      <guid>https://forem.com/szymonsadowski/holiday-gift-guide-for-the-developer-in-your-life-1368</guid>
      <description>&lt;p&gt;It’s that time of the year again! Are you someone who loves to surprise that special someone in your life? If that special someone is a developer, you might find some ideas here that will help you check one thing off your list.&lt;/p&gt;

&lt;h3&gt;
  
  
  Learning
&lt;/h3&gt;

&lt;p&gt;I know, I know, learning? It may sound a bit dull for a holiday gift, but there are some incredible courses and books out there that any programmer would be thrilled to receive!&lt;/p&gt;

&lt;p&gt;I won’t cover every language or stack, assuming you know a bit about the person. Here, I’ll recommend things I’d love to get (if I didn’t have them already!).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;For the &lt;strong&gt;book&lt;/strong&gt;, I've chosen perhaps the best thing I've read this year &lt;a href="https://www.refactoringui.com/"&gt;”Refactoring UI”&lt;/a&gt; it’s a great book that explains user interfaces in a way I haven't found elsewhere. I use it every time I start a new project to remind myself of the rules it lays out. It also explains why Tailwind is the way it is and how to implement good design on your own.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;course&lt;/strong&gt; I recommend is focused on TypeScript—specifically, how to become a TypeScript Wizard..&lt;a href="https://www.totaltypescript.com/products"&gt;”Total Typescript”&lt;/a&gt; by Matt Pocock takes you on a beautiful journey, and by the end, you'll know more than most about TypeScript and how to use it. All presented in an easy-to-understand format with a beautiful graphical setting.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Gadgets
&lt;/h3&gt;

&lt;p&gt;Now, onto the most interesting stuff! I love gadgets, and I think most tech enthusiasts do too. Here’s a short list that hopefully won’t disappoint:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Desk mats.&lt;/strong&gt; Does the person you're thinking of have a worn-out mouse pad or one with stains from four years ago? It's time to change that. I recommend two beautifully designed mats: one made from leather from &lt;a href="https://www.orbitkey.com/products/orbitkey-desk-mat"&gt;Orbitkey&lt;/a&gt; or If you more like felt &lt;a href="https://oakywood.shop/products/felt-cork-desk-mat"&gt;Oakywoood&lt;/a&gt; makes really great ones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Charger&lt;/strong&gt;. In this age of multiple devices, we all hate wires, especially on our desks. To fix that*&lt;em&gt;,&lt;/em&gt;* &lt;a href="https://www.amazon.com/Satechi-Magnetic-Wireless-Charging-Stand/dp/B09LRKZ4BN"&gt;Satechi&lt;/a&gt; offers a great charger that can charge your phone, watch, and AirPods all at the same time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mouse&lt;/strong&gt;. Does this person use free company mouse? Please help them. There is only one good choice here and it’s &lt;a href="https://www.amazon.com/Logitech-MX-Master-3S-Graphite/dp/B09HM94VDS"&gt;MX Master 3s&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stand for MacBook&lt;/strong&gt;. If you see someone using stacks of books to hold their laptop, that's not good. Make it more ergonomic and safe by getting them this stand from &lt;a href="https://www.amazon.com/Twelve-South-Laptops-MacBooks-ergonomic/dp/B07377XVNY"&gt;Twelve South&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Lightning
&lt;/h3&gt;

&lt;p&gt;I am personally big fun of lighting. I think it can change the space you live in, work in etc. without spending big bucks.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Led Light Bars&lt;/strong&gt;. &lt;a href="https://www.amazon.com/Govee-Assistant-Backlights-Pictures-Decoration/dp/B096WZXKZP"&gt;Govee Smart Led Light Bars&lt;/a&gt;  are a great choice for affordable LED lights to put on your monitor or desk. They work well with Alexa, Google, and the Govee app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Led Stripe&lt;/strong&gt;. &lt;a href="https://www.amazon.com/YEELIGHT-Homekit-Changing-Segmented-Control/dp/B09HZQ8RX7?crid=2I2VGTBQZLX8G&amp;amp;keywords=yeelight+led+strip+homekit&amp;amp;qid=1701795915&amp;amp;sprefix=yeelight+led+strip+homeki,aps,180&amp;amp;sr=8-4&amp;amp;th=1"&gt;YeeLight&lt;/a&gt; makes one of the cheapest led stripes that work out of the box with homekit which is imporant for some people. It is not the best led stripe out there but it brings really good value for money.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Led lamps.&lt;/strong&gt; This lamps i first notice in one of MKBHD vidoes. They are great but they are made by &lt;a href="https://www.amazon.com/Philips-Hue-Gradient-Signe-Table/dp/B09BDLV9BV?keywords=Philips-Hue&amp;amp;qid=1701795717&amp;amp;sr=8-18&amp;amp;th=1"&gt;Phillips Hue&lt;/a&gt; that means they are quite expensive. But don’t worry &lt;a href="https://www.amazon.com/Govee-Changing-Control-Creative-Bedroom/dp/B08V8GS7PF"&gt;Govee&lt;/a&gt; makes cheaper one though it doesn’t work with HomeKit without some hacks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, here's my holiday gift guide. I hope it helps you bring joy to your loved ones or find something great for the company Christmas party. Have a happy holidays! 🌲&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>Is learning Algorithms and Data Structures as Frontend Developer worth it?</title>
      <dc:creator>Szymon Sadowski</dc:creator>
      <pubDate>Fri, 12 May 2023 16:56:19 +0000</pubDate>
      <link>https://forem.com/szymonsadowski/i-spent-24-hours-to-learn-about-data-structures-and-algorithms-was-it-worth-it-53ij</link>
      <guid>https://forem.com/szymonsadowski/i-spent-24-hours-to-learn-about-data-structures-and-algorithms-was-it-worth-it-53ij</guid>
      <description>&lt;p&gt;As a Frontend Developer, I believe that data structures and algorithms are often neglected. We tend to focus on topics such as frameworks, new infrastructure tools, and styling options, while basic computer science concepts are left behind, particularly for self-taught developers.&lt;/p&gt;

&lt;p&gt;Table of contents&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Why would you learn them? &lt;a&gt;&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;
The Importance of Data Structures and Algorithms in the Hiring Process &lt;a&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
Ok, You have me so what I should learn? &lt;a&gt;&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;
DS &lt;a&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
Algo &lt;a&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
From What Should I learn? &lt;a&gt;&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;
Summary &lt;a&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why would you learn them? &lt;a&gt;
&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;There are many reasons here are the things I think are really important:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Problem-Solving Skills. If you ever tried to solve any leetcode or hackerrank problem and it was hard for you learning DS and Algo will really help you. Later you will also be able to use this skills in real life.&lt;/li&gt;
&lt;li&gt;More Efficient Code, learning a thing or two about time and space complexity let’s you understand what’s really happening and what is the most optimal way to solve a problem.  And we are all about performant code!&lt;/li&gt;
&lt;li&gt;Learning basic concepts let’s you switch technologies later on. Even if you migrate from TS to Rust CS fundamentals will stay the same. Don’t close doors, open them.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Importance of Data Structures and Algorithms in the Hiring Process &lt;a&gt;
&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;There is no way around it. Data structures and algorithms are important in the hiring process because they are fundamental to computer science and software engineering. &lt;/p&gt;

&lt;p&gt;Demonstrating knowledge of these concepts is often expected in technical job interviews and is a standard benchmark for evaluating technical proficiency. If you want to enhance your career opportunities - many companies require candidates to have knowledge of this topic during technical interview - &lt;strong&gt;you have to get through it!&lt;/strong&gt; By learning these concepts, you can improve your chances of landing a job or advancing in your current role.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ok, You have me so what I should learn? &lt;a&gt;
&lt;/a&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  DS &lt;a&gt;
&lt;/a&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Arrays: Basic data structure that is everywhere. They are like brick to a building, more complex structures are build out of it. (For people that are used to “arrays” in JS this could be eye-opener!)&lt;/li&gt;
&lt;li&gt;Linked Lists: A linked list is a data structure in which each element (node) contains a reference to the next node in the list. Linked lists are often used to implement other data structures, such as stacks and queues. &lt;/li&gt;
&lt;li&gt;Binary Trees: A binary tree is a hierarchical data structure in which each node has at most two children. Binary Trees are optimization monsters and can come really handy.&lt;/li&gt;
&lt;li&gt;Hash Tables: A hash table is a data structure that uses a hash function to map keys to values, allowing for efficient retrieval of data. &lt;/li&gt;
&lt;li&gt;Graphs: A graph is a data structure that consists of a set of nodes (vertices) and edges that connect them. Graphs are used to model relationships between objects. If someone will try to explain them to You there is 90% chance they will use flights or social networks.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each of these data structures has its pros and cons. Although arrays are the most common, after understanding linked lists and binary trees, you will be able to see how you can replace them with more performant structures. Graphs, especially weighted graphs, are the hardest to understand, so I recommend ending your learning with them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Algo &lt;a&gt;
&lt;/a&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Sorting Algorithms: Sorting algorithms are used to arrange data in a specific order. Some commonly used sorting algorithms include Quicksort, Mergesort, and Heapsort. These algorithms are used in everyday programming tasks, such as sorting an array or a list of items. Understanding the basic concepts behind them, especially time and space complexity, is essential for any programmer.&lt;/li&gt;
&lt;li&gt;Recursion: Recursion is a powerful technique used in programming that involves a function calling itself. Although it can be hard to understand at first, learning how recursion works will help you tackle many programming problems more efficiently. &lt;strong&gt;I recommend reading the chapter on recursion in "A Common-Sense Guide to Data Structures and Algorithms" by Jay Wengrow.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Breadth-First Search and Depth-First Search: These are two popular algorithms used for tree structures. They are commonly used in solving problems on platforms like LeetCode. Learning them will help you understand graph algorithms better.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  From What Should I learn? &lt;a&gt;
&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Two “Musts” for me are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"A Common-Sense Guide to Data Structures and Algorithms" by Jay Wengrow.&lt;/li&gt;
&lt;li&gt;"The Last Algorithm Course You Will Ever Need" by ThePrimegen on Frontend Masters (it's free!)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here are some more “academic” books that are still really good even for begginer:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;"Introduction to Algorithms" by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein: It is considered a standard reference for computer science students and professionals.&lt;/li&gt;
&lt;li&gt;"Data Structures and Algorithms Made Easy" by Narasimha Karumanchi: This book provides a practical and easy-to-understand introduction to data structures and algorithms. Problem with it for me that examples are in Java or C++. &lt;/li&gt;
&lt;li&gt;"Cracking the Coding Interview" by Gayle Laakmann McDowell: This book will help you prepare for next technical interview!&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Summary &lt;a&gt;
&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;If you are a developer looking to improve your problem-solving skills, write more efficient code, and better understand how software works, then learning data structures and algorithms is a must. Even if you don’t think that you will apply to Google and knowledge of how to invert binary tree will be useful trust me some of the concepts will really have an impact on you as a developer.&lt;/p&gt;

&lt;p&gt;While it may take time and effort to master these concepts, the rewards are definitely worth it. And with so many resources available to help you learn, there has never been a better time to start.&lt;/p&gt;

&lt;p&gt;If you have any comments, opinions or more resources please drop them in the comments below!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>algorithms</category>
      <category>career</category>
    </item>
    <item>
      <title>10 Things from Pragmatic Programmer (almost) 25 years later</title>
      <dc:creator>Szymon Sadowski</dc:creator>
      <pubDate>Sun, 30 Apr 2023 12:16:07 +0000</pubDate>
      <link>https://forem.com/szymonsadowski/10-things-from-pragmatic-programmer-almost-25-years-later-2bp1</link>
      <guid>https://forem.com/szymonsadowski/10-things-from-pragmatic-programmer-almost-25-years-later-2bp1</guid>
      <description>&lt;p&gt;As someone who has been in the programming space for quite some time now, I have heard the title of this book many times. Upon reading it, I even realized that I knew many of the concepts that were either started or propagated by it.&lt;/p&gt;

&lt;p&gt;Just recently, I had a talk with a more experienced colleague (let's say a senior software engineer for convenience) about various topics, including the principles of programming. We discussed how many people only know the library and not the language (hello Prime) and other similar topics.&lt;/p&gt;

&lt;p&gt;My colleague mentioned that among the many books he had read, this particular book had a really big impact on him, and he still follows many of the rules set forth by the book to this day. This made me realize that I had not yet read the book. So, I got a copy of it, sat down, and tried to understand this 25-year-old programming knowledge.&lt;/p&gt;

&lt;h2&gt;
  
  
  10 Most impactful things that i got from reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt; Always use a version control system - Nowadays, Git solutions are common; however, in 1999, this was groundbreaking.&lt;/li&gt;
&lt;li&gt;Learn a new programming language or technology every year - Learning a new language every year may be demanding. Instead, consider learning a new framework or any new technology. Keep learning and trying new things, even if you won't use them. This will improve your skills overall, especially in the JavaScript world.&lt;/li&gt;
&lt;li&gt;Practice good code hygiene - This means writing code that is easy to read, test, and maintain. Many books cover this, and it's hard to say what exactly is easy to read code, but we all know it when we see it, right?&lt;/li&gt;
&lt;li&gt;Don't repeat yourself (DRY) - Avoid duplicating code or logic in your programs. Of course, repeating the same logic in code is bad. However, nowadays, some programmers try to abstract everything in ways that may be hurtful. So, don't write the same function logic five times, but if you only use it twice, don't build a whole module for it that will take 10 hours to understand.&lt;/li&gt;
&lt;li&gt;Use automation to your advantage - Automate repetitive tasks to save time and reduce errors. In the prime DevOps era, use CI/CD. One of my favorite books is "Modern Software Engineering: Doing What Works to Build Better Software Faster." Maybe I will write 10 things from it later?&lt;/li&gt;
&lt;li&gt;Keep it simple, stupid (KISS) - Strive for simplicity in your code and design.&lt;/li&gt;
&lt;li&gt;Write tests for your code - This will help you catch bugs early and ensure that your code works as expected.&lt;/li&gt;
&lt;li&gt;Refactor your code regularly - This means improving the design of your code without changing its behavior. Do not put tasks like "REFACTORING USER PAGE" in your backlog. Refactoring is a constant process. If you are adding a feature and see some part of code you would like to rewrite, just do it. If you are constantly doing this, you will never have to "waste" time for a big refactor.&lt;/li&gt;
&lt;li&gt;Use patterns and idioms wisely - These are proven solutions to common programming problems, but they should not be applied blindly. &lt;/li&gt;
&lt;li&gt;Continuously learn and improve - Never stop learning and experimenting with new technologies and techniques. This is the best advice not only for programming but for life in general.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  So how it is holding up?
&lt;/h2&gt;

&lt;p&gt;First of all, it's worth noting that this book was published in 1999, so some of the specific technologies and tools mentioned in the book may be outdated. However, the general principles and practices outlined in the book are still highly relevant today and are considered timeless.&lt;/p&gt;

&lt;p&gt;For example, the book emphasizes the importance of writing code that is easy to read, test, and maintain, as well as the value of continuous learning and improvement. These principles are still highly relevant and are widely embraced by software developers today.&lt;/p&gt;

&lt;p&gt;Additionally, the book emphasizes the importance of using version control, which is still a fundamental practice in software development. The book also introduces the concept of "DRY" (Don't Repeat Yourself), which is still a guiding principle for many developers.&lt;/p&gt;

&lt;p&gt;One aspect of the book that some may consider outdated is the emphasis on object-oriented programming (OOP) and design patterns. While OOP is still widely used, there has been a growing trend towards functional programming in recent years, and some developers may view OOP as less relevant today. Similarly, while design patterns are still used, some developers may view them as overused and may prefer to focus on simpler, more flexible designs.&lt;/p&gt;

&lt;p&gt;Overall, while some of the specific technologies and tools mentioned in "The Pragmatic Programmer" may be outdated, the book's principles and practices are still highly relevant today and are widely embraced by software developers.&lt;/p&gt;

&lt;h3&gt;
  
  
  If you are interested in this kind of knowledge here are books that great
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;"Clean Code" and "The Clean Coder" by Robert C. Martin - These books were published in 2008 and 2011 respectively, making them newer. "Clean Code" focuses on the importance of writing clean, readable, and maintainable code. It covers topics like naming, formatting, and code structure, and emphasizes the importance of writing code that is easy to understand and modify. "The Clean Coder" focuses more on you as a programmer, with topics like communication, teamwork, and ethical behavior. It offers practical advice on how to be an effective and responsible software developer.&lt;/li&gt;
&lt;li&gt;"Domain-Driven Design" by Eric Evans - This book, first published in 2003, offers a comprehensive approach to software development that emphasizes the importance of understanding the business domain and designing software around it. It covers topics like bounded contexts, aggregates, and domain events, and provides practical guidance on how to implement domain-driven design principles in your projects.&lt;/li&gt;
&lt;li&gt;"Refactoring: Improving the Design of Existing Code" by Martin Fowler - This book, first published in 1999, focuses on the importance of improving the design of existing code through a process called refactoring. It provides practical guidance on how to identify code smells and apply refactorings to improve the structure, readability, and maintainability of your code.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to read more from me visit &lt;a href="https://szymonjakubsadowski.com/blog"&gt;my blog&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>computerscience</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
    <item>
      <title>A Beginner's Guide to Edge and Serverless Functions</title>
      <dc:creator>Szymon Sadowski</dc:creator>
      <pubDate>Sat, 08 Apr 2023 11:41:29 +0000</pubDate>
      <link>https://forem.com/szymonsadowski/a-beginners-guide-to-edge-and-serverless-functions-2j9k</link>
      <guid>https://forem.com/szymonsadowski/a-beginners-guide-to-edge-and-serverless-functions-2j9k</guid>
      <description>&lt;p&gt;As a junior developer, you may have heard of edge functions and serverless functions, but do you know the differences between them? In this article, we'll explore the key characteristics of each type of function and their pros and cons.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are Serverless Functions?
&lt;/h3&gt;

&lt;p&gt;Serverless functions are pieces of code that run on a serverless computing platform (cloud), such as Azure Functions or AWS Lambda. They are small and self-contained and are executed in response to specific events. If you're using Next.js, the service you use to deploy them is Vercel. When you deploy the application, all the functions from &lt;code&gt;api routes&lt;/code&gt; will be used as serverless functions. They can be used for a wide range of tasks, from simple data processing to complex business logic.&lt;/p&gt;

&lt;p&gt;One of the main advantages of serverless functions is that they can scale automatically, without the need for manual intervention. This means that if your application experiences a sudden spike in traffic, the serverless function will automatically scale to handle the additional load. Another advantage is pricing. You only pay when the functions are executed, not for upkeep.&lt;/p&gt;

&lt;p&gt;However, a disadvantage of serverless functions is the occurrence of cold starts. If you're not calling your function frequently, the service you use will need to create a new instance of the function, which takes time. After a cold start, the function will run faster for some time. High latency is also a common occurrence. Since they are mostly deployed on one server, if, for example, you're using a server from Oregon and your user tries to connect from India, the distance between the server and the client is quite long. That's why you probably shouldn't use them for tasks that require low latency.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are Edge Functions?
&lt;/h3&gt;

&lt;p&gt;Edge functions, also known as CDN functions, are pieces of code that run on the edge of a content delivery network. &lt;br&gt;
What is a &lt;strong&gt;CDN&lt;/strong&gt; you may ask. &lt;em&gt;A CDN is a distributed network of servers that helps deliver content (such as images, videos, and static files) to users faster and more reliably.&lt;/em&gt;&lt;br&gt;
Edge functions are not deployed only on one server like serverless functions but on many. This means that the function code is executed closer to the end-user, resulting in faster response times and reduced latency. Edge functions can be used to modify or augment content as it is being delivered to the end-user, without the need for additional server infrastructure. &lt;strong&gt;We can think of them as serverless functions living a layer closer to the user.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For example, imagine that you're building a web application that displays images. You want to ensure that the images are compressed before they are sent to the user, in order to reduce page load times. With an edge function, you can apply compression to the images as they are being delivered, without the need for additional server infrastructure.&lt;/p&gt;

&lt;p&gt;A big disadvantage of edge functions is that, in contrast to serverless functions, which can use different runtimes, they useGoogle's V8 JavaScript engine. This means that they can't do as much as their serverless counterparts. For example, V8 does not support some popular Node.js modules and language features. Additionally, some developers may prefer other languages or runtimes for their functions, which limits their options when using edge functions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which One to Choose?
&lt;/h3&gt;

&lt;p&gt;So, which type of function should you choose for your project? It depends on your specific use case and requirements. Edge functions are ideal for simple content manipulation tasks, such as image compression or code stripping. They are executed on the edge of the network, which makes them faster and more responsive.&lt;/p&gt;

&lt;p&gt;Serverless functions, on the other hand, are more flexible and can be used for a wider range of tasks. They are executed in response to specific events, which means that they are well-suited for complex business logic or data processing tasks. They also offer automatic scaling, which can save time and resources.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Edge functions and serverless functions are both powerful tools for developers. Edge functions are great for improving performance and reducing latency, while serverless functions are better suited for more complex business logic. By understanding the differences between the two, you can choose the right tool for the job and build better applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bonus
&lt;/h3&gt;

&lt;p&gt;If you read to this point I think you are quite interested in this topic. Here are some resources that go on this topic more deeply.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=yuxd2kurpzk&amp;amp;ab_channel=Vercel"&gt;Lee Robinson (Vercel) and Kelsey Hightower (Google) talking about Edge Functions&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=XInQBpTRWwA&amp;amp;ab_channel=Theo-t3%E2%80%A4gg"&gt;Theo (ping.gg) Going on one of his rants about Edge Functions and if they are future of the web dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://vercel.com/try/ebook-edge-middleware?utm_source=google&amp;amp;utm_medium=cpc&amp;amp;utm_campaign=18156524857&amp;amp;utm_campaign_id=18156524857&amp;amp;utm_term=serverless%20functions&amp;amp;utm_content=143333775809_618727714734&amp;amp;gclid=Cj0KCQjwocShBhCOARIsAFVYq0iKeKUoBRXF960qfJSw7QBdq3tF9bBh7ftUKSSegobXqCpKKInrxjYaAoarEALw_wcB"&gt;How to deliver personalized content at the edge?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Big thank you to the &lt;a href="https://twitter.com/iamjakeingle"&gt;@iamjakeingle&lt;/a&gt; for the cover photo!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>cloud</category>
    </item>
    <item>
      <title>My Tailwind CSS Kit</title>
      <dc:creator>Szymon Sadowski</dc:creator>
      <pubDate>Wed, 15 Mar 2023 17:51:00 +0000</pubDate>
      <link>https://forem.com/szymonsadowski/my-tailwind-css-kit-jm6</link>
      <guid>https://forem.com/szymonsadowski/my-tailwind-css-kit-jm6</guid>
      <description>&lt;p&gt;Tailwind is probably the hottest CSS solution right now. This utility-first library provides amazing flexibility and speed of development with a small learning curve (if you already know CSS well).&lt;/p&gt;

&lt;p&gt;In this short article, I will try to provide you with all the resources needed (all that I use) while developing an app with Tailwind.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating project
&lt;/h2&gt;

&lt;p&gt;Hardest part of any project, from this point forward easy-peasy lemon squeaky. I mostly use &lt;a href="https://create.t3.gg/"&gt;create-t3-app&lt;/a&gt; because it provides all the libraries I require from the get-go. If you are using for example &lt;code&gt;npm create vite&lt;/code&gt; or some other command to create your project, it’s almost sure that official &lt;a href="https://tailwindcss.com/docs/guides"&gt;tailwind docs&lt;/a&gt; has you covered. &lt;/p&gt;

&lt;h2&gt;
  
  
  How to remember all &lt;strong&gt;these&lt;/strong&gt; shortcuts?
&lt;/h2&gt;

&lt;p&gt;I had a problem with it at the beginning, but to be honest, they are quite simple. After your second project with Tailwind, you will know most of them. But I always keep a cheat sheet close-by.&lt;/p&gt;

&lt;p&gt;Won’t lie if I say that basically anything you pick will work. The most important thing that I will fit your style/workflow. Here are the most common:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://tailwindcomponents.com/cheatsheet/"&gt;tailwind components&lt;/a&gt; → looks nice, has good toast info that you really copied the class,&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://nerdcave.com/tailwind-cheat-sheet"&gt;nerdcave&lt;/a&gt; → looks the most out of ‘90, but big plus is that you can select Tailwind &lt;strong&gt;version&lt;/strong&gt;,&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://flowbite.com/tools/tailwind-cheat-sheet/"&gt;flowbite&lt;/a&gt; → The one I use the most. For me, most visually pleasing, and you also can select Tailwind version easily.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So if you have one of these on your second monitor or anywhere close, I think you can style elements very really easy.&lt;/p&gt;

&lt;p&gt;I must here say that not all the tech docs are well-designed and maintained (looking at you tRPC) but Tailwind has one of the best docs site there is. Very pretty, with UX you can dream of on your site. Mostly I use it to copy some classes or to learn a thing or two. It takes too much time (compared to a cheat sheet) to use it while programming for my taste. But I wouldn’t be surprised if many people preferred it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plugins
&lt;/h2&gt;

&lt;p&gt;Now real magic enters the room.&lt;/p&gt;

&lt;h3&gt;
  
  
  Extension
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Tailwind CSS IntelliSense is a godsend.&lt;/strong&gt;&lt;br&gt;
 It’s enough if you are in the neighborhood of the property you want. Just press control + space (or whatever your IDE/operating system accepts) and there you can select the class you wanted but didn’t know how to name. If I say that cheat sheets are a nice-to-have intellisense is a must for me. Speeds up work so much, and the autocomplete is brilliant as always.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prettier
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;I don't like Tailwind because of the long classes&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;How can I know where anything is in this mess?&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;What are some comments I read on the internet These people didn’t have their prettier tailwind plugin. This bad-boy sorts your classes as well as the librarian sorts books. Always the same order. If you get used to it, there is no going back.&lt;/p&gt;

&lt;h3&gt;
  
  
  Library
&lt;/h3&gt;

&lt;p&gt;I know what you think, most of the components for Tailwind cost money! And you won’t spend your precious hard-earned cash on the side-project. Here comes a great man called &lt;a href="https://twitter.com/shadcn"&gt;shadcn&lt;/a&gt;. He created something really good. &lt;/p&gt;

&lt;p&gt;A component library based on Radix (which I wrote about &lt;a href="https://dev.to/szymonsadowski/css-journey-1-stitches-3p9b"&gt;here&lt;/a&gt;) and styled them with Tailwind. It’s nice to mention that for some time, Radix official docs have Tailwind examples! &lt;br&gt;
You can just copy and paste classes, and add to your project-specific Radix components and here You have a styled component that it’s responsive and have everything that You would want out of it.&lt;/p&gt;

&lt;p&gt;You also have more selection as Tailwind is on top of the world right now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://daisyui.com/"&gt;Daisy UI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.hyperui.dev/"&gt;HyuperUI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;I'm curious, I want to know more&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;That’s really great, here are some resources I recommend:&lt;/p&gt;

&lt;h3&gt;
  
  
  Book
&lt;/h3&gt;

&lt;p&gt;Authors of Tailwind wrote a great book &lt;a href="https://www.refactoringui.com/"&gt;”Refactoring UI"&lt;/a&gt;. I can’t recommend it enough. Maybe it won’t teach you Tailwind tricks, but I will make you understand the whole design system below it. Why &lt;code&gt;shadow-md&lt;/code&gt; have these values not other how to use color pallets etc. It’s definitely worth your time and I will for sure make you a better UI/UX expert, which even as developers we need to be.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bonus
&lt;/h3&gt;

&lt;p&gt;Interesting and helpful resources on Tailwind: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://lexingtonthemes.com/free-templates/"&gt;Outstanding themes and UI Kits&lt;/a&gt; by &lt;a href="https://twitter.com/Mike_Andreuzza"&gt;Michael Andreuzza&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="//tremor.so"&gt;tremor.so&lt;/a&gt; - an Incredible open-source library built on top of Tailwind for devs to build dashboards and charts&lt;/li&gt;
&lt;li&gt;All of the work that &lt;a href="https://twitter.com/simonswiss"&gt;Simon Vrachliotis&lt;/a&gt; does&lt;/li&gt;
&lt;li&gt;Ever tried to create an HTML template for email? Here a is better way to do it with Tailwind &lt;a href="https://resend.com/blog/tailwind-with-react-email"&gt;Resend&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/surjithctly/status/1635542102778994688"&gt;Mega thread&lt;/a&gt; by &lt;a href="https://twitter.com/surjithctly"&gt;surjithctly&lt;/a&gt; which shows some amazing tricks you can do with Tailwind!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are many more people that are doing great work in the space. If the community is vibrant and active, you know that the tech is at least worth a try!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>tailwindcss</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How Memo changes rendering?</title>
      <dc:creator>Szymon Sadowski</dc:creator>
      <pubDate>Tue, 14 Feb 2023 14:51:47 +0000</pubDate>
      <link>https://forem.com/szymonsadowski/how-memo-changes-rendering-3o5a</link>
      <guid>https://forem.com/szymonsadowski/how-memo-changes-rendering-3o5a</guid>
      <description>&lt;p&gt;As developers, we strive to achieve the best performance in our applications. One way to do that in React is to restrict the number of re-renders. There are many tools that we are outfitted with to do that. In this short article, I will focus on the memoization of the component.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What triggers re-renders?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To better understand the subject, it is important to know how React triggers re-renders.&lt;/p&gt;

&lt;p&gt;The component has three main reasons to render:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;when the state changes,&lt;/li&gt;
&lt;li&gt;when its parent renders (by default when the parent renders, all children also render),&lt;/li&gt;
&lt;li&gt;when the context changes (if the component is subscribed).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Out-of-the-box modern declarative frameworks mostly re-render too much.&lt;/p&gt;

&lt;p&gt;To block re-renders we can use memo (or pure components in-class component, but we won’t focus on that). Using memo causes that component to “remember” props and compare them with new ones. When we are dealing with primitive types the situation is simple and clear, when we are dealing with more complex types behavior may differ.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9dcsvzw23borcok25ds.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9dcsvzw23borcok25ds.png" alt="Fig. 1. Memo blocking render even though parent re-renders" width="800" height="606"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Fig. 1. Memo blocking render even though parent re-renders
&lt;/h5&gt;

&lt;h2&gt;
  
  
  How to use Memo
&lt;/h2&gt;

&lt;p&gt;Here we have our children component. It takes props &lt;code&gt;checked&lt;/code&gt; and &lt;code&gt;children&lt;/code&gt;. We export this component as memoized.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk425c87bpojuh1a5lqht.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk425c87bpojuh1a5lqht.png" alt="Fig. 2. Exporting component as memoized" width="793" height="525"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Fig. 2. Exporting component as memoized
&lt;/h5&gt;

&lt;p&gt;Now we will test it with different props and see when memo works and when it does not.&lt;/p&gt;

&lt;h3&gt;
  
  
  Text and boolean
&lt;/h3&gt;

&lt;p&gt;First, we try sending as a boolean checked and text as children.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsgtzvcowfr8kcwsjz92v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsgtzvcowfr8kcwsjz92v.png" alt="Fig. 3. Sending boolean and text to component" width="799" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Fig. 3. Sending boolean and text to component
&lt;/h5&gt;

&lt;p&gt;In this case, our memo won’t work and both parent and child will re-render every time we click on the checkbox. Why? Because the value of &lt;code&gt;checked&lt;/code&gt; changes, and it influences the state of our &lt;code&gt;MemoizedComponent&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;What if we would get rid of this &lt;code&gt;checked&lt;/code&gt; prop?&lt;/p&gt;

&lt;h3&gt;
  
  
  Text as children
&lt;/h3&gt;

&lt;p&gt;Here we are only sending children, which is normal text.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frez82cg7lbnhjvkriew7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frez82cg7lbnhjvkriew7.png" alt="Fig. 4. Sending only string as children" width="648" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Fig. 4. Sending only string as children
&lt;/h5&gt;

&lt;p&gt;Our memo will work just fine because the &lt;code&gt;string&lt;/code&gt; is &lt;strong&gt;primitive&lt;/strong&gt;, which React compares by value not reference. But this situation rarely happens. Most of the time we send &lt;code&gt;JSX&lt;/code&gt; as children, so what will happen then?&lt;/p&gt;

&lt;h3&gt;
  
  
  JSX as children
&lt;/h3&gt;

&lt;p&gt;Although, visual output will look exactly the same as in the previous case. Under the hood is happening something completely different and both child and parent will re-render every time we click the checkbox.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jtkz07xjwe7q7oxy2hm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jtkz07xjwe7q7oxy2hm.png" alt="Fig. 5. Sending JSX as children" width="555" height="614"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Fig. 5. Sending JSX as children
&lt;/h5&gt;

&lt;p&gt;Why? Because every time when a parent is building its markup, this div is changed to &lt;code&gt;React.CreateElement&lt;/code&gt; which is an &lt;strong&gt;object&lt;/strong&gt;. Objects in JavaScript are compared by reference and that’s why a &lt;code&gt;MemoizedComponent&lt;/code&gt; will always think that when parents re-renders prop changes even though nothing changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;React Memo works, but only in specific circumstances. Most of the time in real-life applications it won’t help much. It can be used in components that have a lot of markup or are static like &lt;code&gt;&amp;lt;Headers/&amp;gt;&lt;/code&gt;,  &lt;code&gt;&amp;lt;Footer/&amp;gt;&lt;/code&gt;, etc.&lt;/p&gt;

&lt;p&gt;Your time will be better spent if you try to avoid prop drilling or go with hooks like useMemo or useCallback. But anyway always before you start optimizing your application try to profile it (using react devtools or similar). It’s important first to understand what is worth optimizing and spending your precious time on things that will improve performance.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Stitches CSS - is it any good?</title>
      <dc:creator>Szymon Sadowski</dc:creator>
      <pubDate>Tue, 17 Jan 2023 17:25:58 +0000</pubDate>
      <link>https://forem.com/szymonsadowski/css-journey-1-stitches-3p9b</link>
      <guid>https://forem.com/szymonsadowski/css-journey-1-stitches-3p9b</guid>
      <description>&lt;p&gt;As a Frontend Developer, You constantly have to style elements. To do that, we have CSS that’s obvious. Right now we there are many existing solutions to achieve the same result from pure CSS, preprocessors like SCSS, &lt;strong&gt;tailwind&lt;/strong&gt; to full-scale libraries (which I'm not a big fan of) like Material-UI. In this series, I will try some of the more interesting ways to make your app look cool and modern.&lt;/p&gt;

&lt;p&gt;I am a big supporter of basically everything that Vercel does. When I saw their projects being made with &lt;a href="https://www.radix-ui.com/"&gt;Radix&lt;/a&gt; and &lt;a href="https://stitches.dev/"&gt;Stitches&lt;/a&gt; I had to try it. Here is how it went.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why would You want to use Stitches?
&lt;/h2&gt;

&lt;p&gt;As their website claims, it’s a near-zero runtime CSS-in-JS solution with multi-variant support. I don’t know about You, but this doesn’t sound very interesting. Another CSS-in-JS huh?&lt;/p&gt;

&lt;p&gt;Not so fast. It has many advantages that for me were maybe not groundbreaking but definitely awesome to use. Especially the combination of them all together.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tokens
&lt;/h3&gt;

&lt;p&gt;What are tokens? They are basically variables in CSS. They allow us to write much faster code, making repetitions obscure. Now think how many times you wrote the same value with the same unit in your CSS code. A lot right?&lt;/p&gt;

&lt;p&gt;But you can say that you can make tokens in pretty much any CSS. But here is how they usually look&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="c"&gt;/* Typography
    ================================================================= */&lt;/span&gt;
    &lt;span class="c"&gt;/* Font sizes - 4x4 grid */&lt;/span&gt;
    &lt;span class="nt"&gt;--font-size-12&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--font-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;3&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--font-size-16&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--font-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;4&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--font-size-20&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--font-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;5&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--font-size-24&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--font-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;6&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--font-size-40&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--font-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;10&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--font-size-48&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--font-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;12&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--font-size-64&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--font-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;16&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--line-height-base-unit&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="c"&gt;/* Line heights */&lt;/span&gt;
    &lt;span class="nt"&gt;--line-height-small&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;   &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--line-height-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--line-height-medium&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--line-height-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="err"&gt;3&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--line-height-large&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;   &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--line-height-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="err"&gt;5&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="c"&gt;/* Font weights */&lt;/span&gt;
    &lt;span class="nt"&gt;--font-weight-lighter&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="err"&gt;100&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;--font-weight-light&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;    &lt;span class="err"&gt;200&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;--font-weight-normal&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;   &lt;span class="err"&gt;400&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;--font-weight-bold&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;     &lt;span class="err"&gt;700&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;--font-weight-bolder&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;   &lt;span class="err"&gt;900&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="c"&gt;/* Space
     ================================================================= */&lt;/span&gt;
    &lt;span class="nt"&gt;--space-base-unit&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--base-unit&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="c"&gt;/* Margin, Padding - 8x8 grid */&lt;/span&gt;
    &lt;span class="nt"&gt;--space-8&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--space-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;2&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--space-16&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--space-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;4&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--space-24&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--space-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;6&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--space-32&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--space-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;8&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--space-40&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--space-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;10&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--space-48&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--space-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;12&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;--space-64&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;calc&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--space-base-unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;16&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And sure you can understand what’s going on, but for me isn’t too complicated. &lt;strong&gt;IT SHOULD BE EASIER&lt;/strong&gt;. And it is. &lt;/p&gt;

&lt;p&gt;Here is a sample from Stitches doing exactly the same&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;spacing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.25rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.5rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.75rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1.25rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1.5rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1.75rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2rem&lt;/span&gt;&lt;span class="dl"&gt;'&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;span class="nl"&gt;fontSizes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;xs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.75rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;sm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.875rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;md&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;lg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1.125rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;xl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1.25rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2xl&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1.5rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;3xl&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1.875rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;4xl&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2.25rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;5xl&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;3rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;6xl&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;4rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;7xl&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;4.5rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;8xl&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;6rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="nx"&gt;fontWeights&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;hairline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;thin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;light&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;normal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;medium&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;semibold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;600&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;bold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;700&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;extrabold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;black&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;900&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="nx"&gt;space&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;span class="nx"&gt;spacing&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Maybe I prefer JSON format but it’s much clearer for me. &lt;/p&gt;

&lt;h3&gt;
  
  
  Variants
&lt;/h3&gt;

&lt;p&gt;This is the key feature of Stitches that allows You to create typed, composable component APIs. For example, you can create a component and use variants to add multiple, compound, or default styles to the component. You can have sharable properties that are applicable to all variants. But by using variant property you can change one of them, are more or do anything you would like to do.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@stitches/react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;button&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$4&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;boxSizing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;border-box&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$publicoText&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;fontWeight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$medium&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$small&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;amp;:focus&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;outline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;none&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;boxShadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0 0 0 2px $colors$shadow&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;amp;:disabled&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;pointerEvents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;none&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;opacity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;50%&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;not-allowed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;variants&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;primary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$elementBackground&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1px solid $border&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;amp;:hover&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$elementHover&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;secondary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$elementGreenBackground&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1px solid $subtleBorder&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;amp;:hover&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$highlight&lt;/span&gt;&lt;span class="dl"&gt;'&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;span class="na"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;true&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;flex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;justifyContent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;alignItems&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$1&lt;/span&gt;&lt;span class="dl"&gt;'&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;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we can see tokens and variants in one harmonious way of working. We use tokens to set properties like colors or sizes.&lt;/p&gt;

&lt;p&gt;I’ve created two variants of buttons that differentiate in color.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleStart&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"secondary"&lt;/span&gt; &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"sm"&lt;/span&gt; &lt;span class="na"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;PlayIcon&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here I use “secondary” variant button and in one go we initiate icon inside it. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G7g30EEQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/95gcg0b5itlka2p68xxj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G7g30EEQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/95gcg0b5itlka2p68xxj.png" alt="Button" width="190" height="69"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think creating variants is very useful, maybe not in your Sunday project, but when You work hand in hand with designers to create a proper design system you really can simplify your code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Utils
&lt;/h3&gt;

&lt;p&gt;The last advantage I want to bring up is utils. They are these little tricks that really speed up development. And for me, this is possibly the best feature of stitches. You can recreate one of the best features of Tailwind inside Stitches with just a few config lines.&lt;/p&gt;

&lt;p&gt;Here is what I use them for but for sure they are many other ways and applications.&lt;/p&gt;

&lt;p&gt;Want to use tailwind like shortcuts like &lt;strong&gt;p,py,px,mt&lt;/strong&gt; etc? No problem&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;utils&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;p&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;paddingTop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;paddingBottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;paddingLeft&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;paddingRight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;value&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;By using this you abbreviate CSS properties and can call them what You want and aggregate them like in example above.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why would You NOT want to use Stitches?
&lt;/h2&gt;

&lt;p&gt;To be honest, it ain’t perfect. It has many flaws like every library, but here are the things that bugged me while working with it.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Resources&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;They are very sparse and to find how to use some of the more complicated and advanced features you have to work with YouTube tutorials that are quite outdated. Also, they are docs that are good but not covering every use case I wanted to read about.&lt;/p&gt;

&lt;p&gt;When you go with a more popular solution when You find yourself stuck it’s much easier to find answers than when working with Stitches that’s for sure.&lt;/p&gt;

&lt;p&gt;Example. I wanted to use my tokens in CSS properties when setting shadows etc.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt; &lt;span class="nx"&gt;boxShadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0 0 0 2px $shadow&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At first, I thought that I should be easy and just use token I set, and we are all good to go. But no, You have to use additional $colors before.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt; &lt;span class="nx"&gt;boxShadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0 0 0 2px $colors$shadow&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To find that out, I had to spend too much time searching for the answers. For my taste, of course. For many of You, many things that I found frustrating are just obvious because You had worked with similar libraries.&lt;/p&gt;

&lt;h3&gt;
  
  
  Config
&lt;/h3&gt;

&lt;p&gt;The hardest part of working with Stitches is creating a config file. When You jump into a project with it already prepared, It would really be a lifesaver. But making it from scratch for small project is a time-consuming mess with answers that are not easy to find (see point above).&lt;/p&gt;

&lt;p&gt;Example. As I said I was using Radix with it to provide some primitives. Radix also offers colors (which Stitches docs recommends, though they are all made by the same people). Theming is quite easy and fun to make with it but setting the colors? Very error prone.&lt;/p&gt;

&lt;p&gt;How &lt;strong&gt;IT SHOULD&lt;/strong&gt; work? &lt;/p&gt;

&lt;p&gt;You just import color palette from &lt;code&gt;@radix-ui/colors&lt;/code&gt; spread it in &lt;code&gt;colors&lt;/code&gt; property and we are done. And in “light” theme I got it to work just perfect&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nf"&gt;createStitches&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;colors&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;span class="nx"&gt;green&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;slate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;blackA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="c1"&gt;// Alias&lt;/span&gt;
        &lt;span class="na"&gt;appBackground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$slate1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;subtleBackground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$slate2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;elementBackground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$slate6&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;hoverBackground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$green6&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$slate5&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;highlight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$green9&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;elementGreenBackground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$green7&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;elementHover&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$slate8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$blackA7&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$slate12&lt;/span&gt;&lt;span class="dl"&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 same way should work for dark theme, right? Nope I had to write HSL colors to make it finally work.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;darkModeConfig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;colors&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;span class="nx"&gt;greenDark&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;appBackground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hsl(200, 7.0%, 8.8%)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// slateDark1&lt;/span&gt;
    &lt;span class="na"&gt;subtleBackground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hsl(195, 7.1%, 11.0%)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;//slateDark2&lt;/span&gt;
    &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hsl(210, 6.0%, 93.0%)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// slateDark12&lt;/span&gt;
    &lt;span class="na"&gt;hoverBackground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hsl(154, 50.9%, 17.6%)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;//greenDark6&lt;/span&gt;
    &lt;span class="na"&gt;elementBackground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hsl(199, 6.4%, 17.9%)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;//slateDark6,&lt;/span&gt;
    &lt;span class="na"&gt;elementHover&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hsl(207, 5.6%, 31.6%)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// slateDark8&lt;/span&gt;
    &lt;span class="na"&gt;elementGreenBackground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hsl(153, 51.8%, 21.8%)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// greenDark7&lt;/span&gt;
    &lt;span class="na"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hsl(199, 6.4%, 17.9%)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;highlight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$greenDark9&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// won't work for me,&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;Maybe I did something wrong If so please correct me In the comments! It would really want to figure out how it works properly. &lt;/p&gt;

&lt;p&gt;Nonetheless I created a Pretty good config file which you can see in the &lt;a href="https://github.com/szymonSadowski/mapGame/blob/master/src/styles/stitches.config.js"&gt;github repo&lt;/a&gt;&lt;br&gt;
 and use it for yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Would I use it again?
&lt;/h2&gt;

&lt;p&gt;Yes. For me, it’s much better &lt;code&gt;styled components&lt;/code&gt; or &lt;code&gt;emotion&lt;/code&gt;. It has disadvantages, most of them coming from that this framework isn’t that popular, and it’s quite new on the market. But for bigger projects, I would really recommend it. You can separate styles, create variants, tokens and utils. If you don’t like to mix HTML, JS code with CSS this is perfect for you. As you can create one folder and style all the elements there and not worry about it again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Me
&lt;/h2&gt;

&lt;p&gt;This is my first article not really scientific. Would really appreciate feedback on my writing, code and everything. Use comments, my github &lt;a href="https://github.com/szymonSadowski/mapGame"&gt;https://github.com/szymonSadowski/mapGame&lt;/a&gt; or &lt;a href="https://twitter.com/szymdev"&gt;twitter&lt;/a&gt;.****&lt;/p&gt;

&lt;p&gt;And of course try the project I created to play with Stitches and Radix. &lt;a href="https://map-game.vercel.app/"&gt;https://map-game.vercel.app/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>stitches</category>
      <category>javascript</category>
      <category>radix</category>
    </item>
  </channel>
</rss>
