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; } ```