Skip to content

Move css rules from selections.ts to selections.css#166407

Merged
alexdima merged 3 commits intomicrosoft:mainfrom
jkei0:registerThemeParticipant-refactor-selections
Nov 18, 2022
Merged

Move css rules from selections.ts to selections.css#166407
alexdima merged 3 commits intomicrosoft:mainfrom
jkei0:registerThemeParticipant-refactor-selections

Conversation

@jkei0
Copy link
Contributor

@jkei0 jkei0 commented Nov 15, 2022

Issue - #165169

  • src/vs/editor/browser/viewParts/selections/selections.ts

@jkei0
Copy link
Contributor Author

jkei0 commented Nov 15, 2022

@microsoft-github-policy-service agree

@roblourens roblourens assigned hediet and unassigned roblourens Nov 17, 2022
@alexdima alexdima self-requested a review November 18, 2022 09:51
collector.addRule(`.monaco-editor .selected-text { background-color: ${editorInactiveSelectionColor}; }`);
}
const editorSelectionForegroundColor = theme.getColor(editorSelectionForeground);
if (editorSelectionForegroundColor && !editorSelectionForegroundColor.isTransparent()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This specific rule cannot be moved to CSS because its condition is if (editorSelectionForegroundColor && !editorSelectionForegroundColor.isTransparent()). This cannot be expressed in CSS.

@alexdima alexdima self-assigned this Nov 18, 2022
Copy link
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed the necessary change

@alexdima alexdima added this to the November 2022 milestone Nov 18, 2022
@alexdima alexdima merged commit da44da2 into microsoft:main Nov 18, 2022
@alexdima
Copy link
Member

Thank you!

@github-actions github-actions bot locked and limited conversation to collaborators Jan 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants