Skip to content

Commit 2c93580

Browse files
authored
Chat - move variable declaration into CSS (#265480)
1 parent c8f1c4e commit 2c93580

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

src/vs/workbench/contrib/chat/browser/chatWidget.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -723,14 +723,6 @@ export class ChatWidget extends Disposable implements IChatWidget {
723723
this.scrollToEnd();
724724
}));
725725

726-
// Font size variables
727-
this.container.style.setProperty('--vscode-chat-font-size-body-xs', '0.846em' /* 11px */);
728-
this.container.style.setProperty('--vscode-chat-font-size-body-s', '0.923em' /* 12px */);
729-
this.container.style.setProperty('--vscode-chat-font-size-body-m', '1em' /* 13px */);
730-
this.container.style.setProperty('--vscode-chat-font-size-body-l', '1.077em' /* 14px */);
731-
this.container.style.setProperty('--vscode-chat-font-size-body-xl', '1.231em' /* 16px */);
732-
this.container.style.setProperty('--vscode-chat-font-size-body-xxl', '1.538em' /* 20px */);
733-
734726
// Update the font family and size
735727
this._register(autorun(reader => {
736728
const fontFamily = this.chatLayoutService.fontFamily.read(reader);

src/vs/workbench/contrib/chat/browser/media/chat.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
.interactive-session {
7+
/* 11px when base font is 13px */
8+
--vscode-chat-font-size-body-xs: 0.846em;
9+
/* 12px when base font is 13px */
10+
--vscode-chat-font-size-body-s: 0.923em;
11+
/* 13px when base font is 13px */
12+
--vscode-chat-font-size-body-m: 1em;
13+
/* 14px when base font is 13px */
14+
--vscode-chat-font-size-body-l: 1.077em;
15+
/* 16px when base font is 13px */
16+
--vscode-chat-font-size-body-xl: 1.231em;
17+
/* 20px when base font is 13px */
18+
--vscode-chat-font-size-body-xxl: 1.538em;
19+
}
20+
621
.interactive-session {
722
max-width: 950px;
823
margin: auto;

0 commit comments

Comments
 (0)