Skip to content

Commit 1dc1432

Browse files
Merge pull request #7 from shezhangzhang/feat/number-color
Optimize number decoration
2 parents 40ec8fc + 69fb4c9 commit 1dc1432

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "antd-design-token",
33
"displayName": "antd Design Token",
44
"description": "VSCode extension for antd v5 design token.",
5-
"version": "0.3.4",
5+
"version": "0.3.5",
66
"publisher": "shezhangzhang",
77
"engines": {
88
"vscode": "^1.68.0"

src/decoration-manager.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,15 @@ export default class DecorationManager {
206206
const colorValue = getColorTokenValue(this.fullToken[key]);
207207
valueDecorations.push(decoration);
208208

209+
const themeFocusBorderColor = new vscode.ThemeColor("focusBorder");
209210
const decorationType = vscode.window.createTextEditorDecorationType({
210211
after: {
211-
contentText: colorValue ? `**` : `${String(this.fullToken[key])}`,
212+
contentText: colorValue ? "--" : `${String(this.fullToken[key])}`,
213+
color: colorValue ? "transparent" : "#b37feb",
212214
backgroundColor: colorValue || "",
215+
border: "2px solid",
216+
borderColor: themeFocusBorderColor,
213217
margin: "0 0 0 5px;",
214-
color: colorValue || "#b37feb",
215218
fontWeight: "bolder",
216219
},
217220
});

0 commit comments

Comments
 (0)