Skip to content

Commit

Permalink
Merge pull request #7 from shezhangzhang/feat/number-color
Browse files Browse the repository at this point in the history
Optimize number decoration
  • Loading branch information
shezhangzhang authored Aug 5, 2022
2 parents 40ec8fc + 69fb4c9 commit 1dc1432
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "antd-design-token",
"displayName": "antd Design Token",
"description": "VSCode extension for antd v5 design token.",
"version": "0.3.4",
"version": "0.3.5",
"publisher": "shezhangzhang",
"engines": {
"vscode": "^1.68.0"
Expand Down
7 changes: 5 additions & 2 deletions src/decoration-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,15 @@ export default class DecorationManager {
const colorValue = getColorTokenValue(this.fullToken[key]);
valueDecorations.push(decoration);

const themeFocusBorderColor = new vscode.ThemeColor("focusBorder");
const decorationType = vscode.window.createTextEditorDecorationType({
after: {
contentText: colorValue ? `**` : `${String(this.fullToken[key])}`,
contentText: colorValue ? "--" : `${String(this.fullToken[key])}`,
color: colorValue ? "transparent" : "#b37feb",
backgroundColor: colorValue || "",
border: "2px solid",
borderColor: themeFocusBorderColor,
margin: "0 0 0 5px;",
color: colorValue || "#b37feb",
fontWeight: "bolder",
},
});
Expand Down

0 comments on commit 1dc1432

Please sign in to comment.