docs: fix blog code sample typo (#53922)

This commit is contained in:
二货爱吃白萝卜
2025-05-27 16:20:01 +08:00
committed by GitHub
parent 6e38e03cbf
commit 79735429a8
2 changed files with 12 additions and 20 deletions

View File

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

View File

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