diff --git a/website/app/[locale]/(root)/docs/base-colors/content.mdx b/website/app/[locale]/(root)/docs/base-colors/content.mdx index 8f92a61c9..7ddfecee4 100644 --- a/website/app/[locale]/(root)/docs/base-colors/content.mdx +++ b/website/app/[locale]/(root)/docs/base-colors/content.mdx @@ -28,18 +28,18 @@ By default, theme modes [drive](/docs/configuration#themedriver) base color variables meticulously adjusted in light and dark modes. -
+
-
+
```html -
-
+
+
-
-
+
+
``` [View the default variables on GitHub](https://github.com/master-co/css/blob/rc/packages/css/src/config/variables.ts) diff --git a/website/app/[locale]/(root)/docs/introduction/components/CriticalCSSForDocsSitesBenchmark.tsx b/website/app/[locale]/(root)/docs/introduction/components/CriticalCSSForDocsSitesBenchmark.tsx index 6a11742ef..ef837130f 100644 --- a/website/app/[locale]/(root)/docs/introduction/components/CriticalCSSForDocsSitesBenchmark.tsx +++ b/website/app/[locale]/(root)/docs/introduction/components/CriticalCSSForDocsSitesBenchmark.tsx @@ -35,9 +35,9 @@ export default () => ( animated icon={{result.name}}> {/* @ts-expect-error masterCSSResult?.totalCSSSize */} - {result.name !== 'Master CSS' &&
{result.name}, {(result?.totalCSSSize / masterCSSResult?.totalCSSSize).toFixed(1)}x larger
} + {result.name !== 'Master CSS' &&
{result.name}, {(result?.totalCSSSize / masterCSSResult?.totalCSSSize).toFixed(1)}x larger
} {result.name === 'Master CSS' && ( -
( Main {(result?.internals[1].size / 1000).toFixed(1)} kB + Font {(result?.internals[0].size / 1000).toFixed(1)} kB + Normalize {(result?.externals[0].size / 1000).toFixed(1)} kB )
+
( {(result?.internals[1].size / 1000).toFixed(1)} kB + Font {(result?.internals[0].size / 1000).toFixed(1)} kB + Normal {(result?.externals[0].size / 1000).toFixed(1)} kB )
)} ) @@ -66,9 +66,9 @@ export default () => ( animated icon={{result.name}}> {/* @ts-expect-error masterCSSResult?.totalCSSSize */} - {result.name !== 'Master CSS' &&
{result.name}, {(result?.totalCSSBrotliSize / masterCSSResult?.totalCSSBrotliSize).toFixed(1)}x larger
} + {result.name !== 'Master CSS' &&
{result.name}, {(result?.totalCSSBrotliSize / masterCSSResult?.totalCSSBrotliSize).toFixed(1)}x larger
} {result.name === 'Master CSS' && ( -
( Main {(result?.internals[1].brotliSize / 1000).toFixed(1)} kB + Font {(result?.internals[0].brotliSize / 1000).toFixed(1)} kB + Normalize {(result?.externals[0].brotliSize / 1000).toFixed(1)} kB )
+
( {(result?.internals[1].brotliSize / 1000).toFixed(1)} kB + Font {(result?.internals[0].brotliSize / 1000).toFixed(1)} kB + Normal {(result?.externals[0].brotliSize / 1000).toFixed(1)} kB )
)} ) diff --git a/website/app/[locale]/(root)/docs/introduction/content.mdx b/website/app/[locale]/(root)/docs/introduction/content.mdx index ae5cbe92b..d4fcbde93 100644 --- a/website/app/[locale]/(root)/docs/introduction/content.mdx +++ b/website/app/[locale]/(root)/docs/introduction/content.mdx @@ -56,10 +56,34 @@ One of the most unique, [progressive rendering](/docs/rendering-modes/progressiv ``` -This ensures the page generates the [ultra-lightweight CSS](#minimal-css-on-the-market) and the fastest first-page render. +This ensures the page generates the [ultra-lightweight CSS](#minimal-css-on-the-market) and the fastest first-page render, unlike traditionally bundling styles across the entire application. + +### Design System +Master CSS has built-in a neutral design system, Master Design System, including simplified syntax aliases, a crafted [color palette](/docs/colors), visually beautiful [color tokens](/docs/base-colors), universal responsive [breakpoints](/docs/responsive-design), 4 pixels base of [spacing and sizing](/docs/spacing-and-sizing), dark [modes](/docs/variables-and-modes), and more. + +import TextColorsOverview from '../text-colors/components/Overview.mdx' + + +All features are implemented through powerful [configuration](/docs/configuration), and you can build your design system on top of it or use it as a quick starting point. + +### Syntax Highlighting +Master CSS is the first language to highlight class names fully, making identifying their properties, appearance, and state faster. + +(!) Do you find writing utility classes sometimes seem lengthy or hard to read? + + + + <div class="sm:hover:bg-[#ceb195] …"> + + + +(o) Light up your class names in markup from now on! + + + {'
'} + + -### 🚧 Design System -### 🚧 Syntax Highlighting ### 🚧 Code Linting --- @@ -67,7 +91,7 @@ This ensures the page generates the [ultra-lightweight CSS](#minimal-css-on-the- ## Benchmarks Initially, Master CSS was intended to create a CSS engine for production browser runtimes, so we concentrated on performance such as syntax parsing, rule generation, cache sharing, and even browser rendering. -Master CSS doesn't use heavy-duty build tools like [PostCSS](https://postcss.org), [Autoprefixer](https://github.com/postcss/autoprefixer), or any CSS minifiers, and includes these optimizations in the early stages of rule generation. +Master CSS doesn't use heavy-duty build tools like [PostCSS](https://postcss.org), [Autoprefixer](https://github.com/postcss/autoprefixer), or any CSS minifiers, as these rules are generated with optimization. ### Minimal CSS on the market This is a real-world benchmark of critical CSS on page load for well-known official documentation websites. @@ -78,7 +102,7 @@ Reducing [critical CSS](https://web.dev/articles/codelab-extract-and-inline-crit --- -## 🚧 Tech comparisons +## 🚧 Comparisons {/* diff --git a/website/app/[locale]/(root)/docs/minimization/metadata.ts b/website/app/[locale]/(root)/docs/minimization/metadata.ts index fd52f2cd0..6b6821d8b 100644 --- a/website/app/[locale]/(root)/docs/minimization/metadata.ts +++ b/website/app/[locale]/(root)/docs/minimization/metadata.ts @@ -1,7 +1,7 @@ import { Metadata } from 'websites/types/Metadata' const metadata: Metadata = { - title: 'Development strategies for minimizing CSS', + title: 'Minimizing CSS', description: 'Reduce on-page CSS output and complexity using Master CSS APIs.', category: 'Production Optimization', unfinished: true, diff --git a/website/app/[locale]/(root)/docs/text-colors/components/Overview.mdx b/website/app/[locale]/(root)/docs/text-colors/components/Overview.mdx new file mode 100644 index 000000000..462ba4ceb --- /dev/null +++ b/website/app/[locale]/(root)/docs/text-colors/components/Overview.mdx @@ -0,0 +1,16 @@ + + +
M
+
+ +
M
+
+
+```html +
+ M +
+
+ M +
+``` \ No newline at end of file diff --git a/website/app/[locale]/(root)/docs/text-colors/content.mdx b/website/app/[locale]/(root)/docs/text-colors/content.mdx index f913fb3f6..d5456a2a7 100644 --- a/website/app/[locale]/(root)/docs/text-colors/content.mdx +++ b/website/app/[locale]/(root)/docs/text-colors/content.mdx @@ -30,22 +30,7 @@ | `text-red` | bold, energetic, attention-grabbing | By default, theme modes [drive](/docs/configuration#themedriver) text variables meticulously adjusted in light and dark modes. - - -
A
-
- -
A
-
-
-```html -
- A -
-
- A -
-``` + [View the default variables on GitHub](https://github.com/master-co/css/blob/rc/packages/css/src/config/variables.ts) --- diff --git a/website/components/Bar.tsx b/website/components/Bar.tsx index 5c56eca26..33a4360bf 100644 --- a/website/components/Bar.tsx +++ b/website/components/Bar.tsx @@ -9,9 +9,9 @@ export default function Bar({ className, width, animated, children, color = 'tex return (
{/* eslint-disable-next-line @master/css/class-validation */} -
-
+ + + {icon} {/* eslint-disable-next-line @master/css/class-validation */} @@ -25,7 +25,7 @@ export default function Bar({ className, width, animated, children, color = 'tex return -c * t * (t - 2) + b }} /> -
{children}
diff --git a/website/components/IconButtons.tsx b/website/components/IconButtons.tsx index 896679943..717f67dc2 100644 --- a/website/components/IconButtons.tsx +++ b/website/components/IconButtons.tsx @@ -16,7 +16,7 @@ export default ({ children, className, url }: any) => target={item.target} disabled={item.disabled} rel="noreferrer noopener"> - {item.name} + {item.name}
{item.name}
)