From 79735429a8076e54d4b1b13fb7c0fca55a1df0ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E7=88=B1=E5=90=83=E7=99=BD=E8=90=9D?= =?UTF-8?q?=E5=8D=9C?= Date: Tue, 27 May 2025 16:20:01 +0800 Subject: [PATCH] docs: fix blog code sample typo (#53922) --- docs/blog/css-tricks.en-US.md | 16 ++++++---------- docs/blog/css-tricks.zh-CN.md | 16 ++++++---------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/docs/blog/css-tricks.en-US.md b/docs/blog/css-tricks.en-US.md index e53501628b..d76072ac5d 100644 --- a/docs/blog/css-tricks.en-US.md +++ b/docs/blog/css-tricks.en-US.md @@ -20,12 +20,12 @@ In v5, the combination of Button variants and color would create a repetitive se /* Sample code. Not used in real world. */ .ant-btn-solid.ant-btn-red { color: #fff; - background: 1px solid red; + background: red; } .ant-btn-solid.ant-btn-blue { color: #fff; - background: 1px solid blue; + background: blue; } .ant-btn-outlined.ant-btn-red { @@ -170,17 +170,13 @@ If there is one of the most enticing properties in CSS, it would be `@scope`. In ```css /* Theme 1 */ -:where(.css-BamBoo) { - .ant-btn { - color: red; - } +:where(.css-BamBoo).ant-btn { + color: red; } /* Theme 2 */ -:where(.css-LIghT) { - .ant-btn { - color: blue; - } +:where(.css-LIghT).ant-btn { + color: blue; } ``` diff --git a/docs/blog/css-tricks.zh-CN.md b/docs/blog/css-tricks.zh-CN.md index 028b735598..e9bdcdee47 100644 --- a/docs/blog/css-tricks.zh-CN.md +++ b/docs/blog/css-tricks.zh-CN.md @@ -20,12 +20,12 @@ Ant Design v6 的开发过程中,由于不需要再考虑 IE 的兼容问题 /* Sample code. Not used in real world. */ .ant-btn-solid.ant-btn-red { color: #fff; - background: 1px solid red; + background: red; } .ant-btn-solid.ant-btn-blue { color: #fff; - background: 1px solid blue; + background: blue; } .ant-btn-outlined.ant-btn-red { @@ -188,17 +188,13 @@ const Sample = () => { ```css /* Theme 1 */ -:where(.css-BamBoo) { - .component-a span { - color: red; - } +:where(.css-BamBoo).component-a span { + color: red; } /* Theme 2 */ -:where(.css-LIghT) { - .component-b { - color: blue; - } +:where(.css-LIghT).component-b { + color: blue; } ```