diff --git a/documentation/blog/2023-12-13-stylex-post.md b/documentation/blog/2024-09-16-stylex-post.md
similarity index 71%
rename from documentation/blog/2023-12-13-stylex-post.md
rename to documentation/blog/2024-09-16-stylex-post.md
index fa6bf6393faa..0bcb0d27fee5 100644
--- a/documentation/blog/2023-12-13-stylex-post.md
+++ b/documentation/blog/2024-09-16-stylex-post.md
@@ -8,6 +8,8 @@ image: https://refine.ams3.cdn.digitaloceanspaces.com/blog/2023-12-13-stylex-pos
hide_table_of_contents: false
---
+**This article was last updated on September 16, 2024, to add sections on Advanced Stylex Techniques, Performance Considerations, and Using Custom CSS Variables for Theming.**
+
## Introduction
[**Stylex**](https://stylexjs.com/docs/learn/) is a recently (as of Dec 2023) open sourced CSS-in-JS solution developed by Meta. It allows writing atomic inline CSS styles inside React/JavaScript components, and combines the power of static CSS thanks to globally accessible CSS variables. Stylex facilitates collision-free CSS by creating unique class identifiers for each style and by mitigating specificity issues with minimal usage of collision contributors (such as pseudo-classes). These make Stylex much more deterministic, reliable and scalable than other CSS-in-JS solutions like Emotion.
@@ -20,6 +22,15 @@ In this introductory post, we cover how to define and use Stylex styles using th
We are using [this example Next.js app](https://github.com/facebook/stylex/blob/main/apps/nextjs-example) from Facebook as a base and tweaking it to build our own page and component. If you need to, please feel free to clone it, use it locally and adopt your own from it.
+Step by step, we will be covering the following topics:
+
+- [CSS-in-JS with Stylex and TypeScript](#css-in-js-with-stylex-and-typescript)
+- [Styling a Next.js App with Stylex](#styling-a-nextjs-app-with-stylex)
+- [Stylex Performance Benefits](#stylex-performance-benefits)
+- [Using Stylex Variables in a Next.js App](#using-stylex-variables-in-a-nextjs-app)
+- [Statically Typed Styles in Stylex](#statically-typed-styles-in-stylex)
+- [Advanced Stylex Techniques – Path to Better Flexibility](#advanced-stylex-techniques--path-to-better-flexibility)
+
## CSS-in-JS with Stylex and TypeScript
Stylex has two core APIs: the `create` and `props` methods. `stylex.create()` allows us to declare CSS styles with a JavaScript object. The object should have property identifiers that represent CSS classes and their values that stand for CSS rules. The `stylex.props` method lets us access the declared styles from within inline markups.
@@ -425,6 +436,68 @@ Notice, for each style applied, we are invoking the `stylex.props` method and pa
We are able to pass multiple styles to `stylex.props()` and all get merged into a single class. When specificity becomes an issue in the merge, the last style gets ranked the most. Please feel free to learn more in [this section of the docs](https://stylexjs.com/docs/learn/styling-ui/using-styles/#merging-styles).
+## Stylex Performance Benefits
+
+I have been digging into some of the performance-related aspects of **Stylex**, and some clear advantages do seem to be there, actually—mostly concerning fast and efficient performance in terms of apps.
+
+### Atomic CSS for Smaller Bundle Size
+
+One big advantage is that **Stylex** utilizes atomic CSS in that for each style rule, it generates tiny, reusable CSS classes. That keeps the final CSS bundle smaller since it avoids duplication of styles. For example:
+
+```javascript
+// Using Stylex to create atomic styles
+const style = stylex.create({
+ button: {
+ backgroundColor: "blue", // Reusable class for background color
+ color: "white", // Reusable class for text color
+ padding: "12px",
+ },
+ text: {
+ fontSize: "16px", // Reusable font size class
+ color: "black",
+ },
+});
+```
+
+In this case, Stylex generates CSS classes for `backgroundColor` first, then for `color`, and finally, for `fontSize`. Now, if somewhere else in your code, you use `backgroundColor: "blue"`, Stylex can avoid generating a class. It uses this already existing class; hence, that keeps the CSS bundle size smaller.
+
+### Static Analysis for Faster Performance
+
+Another big advantage of Stylex is the fact that it does a lot of **static analysis at compile-time**. Whereas something like **Styled Components** or **Emotion** would generate styles dynamically at runtime, Stylex is generating everything at build time. This greatly reduces runtime overhead and is therefore a big win for performance, especially important for bigger apps.
+
+Here is one example:
+
+```typescript
+// Stylex creates styles at compile-time
+const style = stylex.create({
+ card: {
+ margin: "24px",
+ padding: "16px",
+ border: "1px solid #ddd",
+ },
+});
+```
+
+With Stylex, this code compiles down to static CSS at build time. At render time, there isn't any extra browser overhead, which is often the case with other CSS-in-JS solutions that correctly do on-the-fly CSS generation.
+
+### Reduced Specificity Issues
+
+One sweet thing about Stylex: It reduces specificity problems. By not having deep nesting and crazy pseudo-class use, Stylex keeps CSS lean, which is easy for the browser to process. Here is an example where we add pseudo-classes:
+
+```javascript
+const buttonStyle = stylex.create({
+ button: {
+ color: "white",
+ backgroundColor: "blue",
+ ":hover": {
+ backgroundColor: "darkblue", // Hover effect without specificity change
+ },
+ },
+});
+```
+
+All of these pseudo-classes in Stylex are handled efficiently without increasing specificity, making it easier to manage styles in larger apps.
+
## Using Stylex Variables in a Next.js App
As seen above, we are already using the global Stylex variable, `$`, in our `