Commit 6bf1493c authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera

Merge branch '216491-monaco-diff-selection' into 'master'

Resolve "Selection Highlight Oversteps Bounds in Web IDE"

See merge request gitlab-org/gitlab!41553
parents 62152f0c fc9952ca
...@@ -472,6 +472,22 @@ $line-added: #ecfdf0; ...@@ -472,6 +472,22 @@ $line-added: #ecfdf0;
$line-added-dark: #c7f0d2 !default; $line-added-dark: #c7f0d2 !default;
$line-removed: #fbe9eb; $line-removed: #fbe9eb;
$line-removed-dark: #fac5cd !default; $line-removed-dark: #fac5cd !default;
/*
* The transparent colors are used in Monaco editor. Using full opacity colors
* would hide other layers (selected text, matching brackets).
*
* When the transparent colors get layered on white background, they create their
* full opacity counterparts (computed with https://stackoverflow.com/a/12228643/606571):
*
* - white + $line-added-transparent = $line-added
* - white + $line-added-transparent + $line-added-dark-transparent = $line-added-dark
*
* More details: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41553
*/
$line-added-transparent: rgba(160, 245, 180, 0.2);
$line-added-dark-transparent: rgba(51, 188, 90, 0.2);
$line-removed-transparent: rgba(235, 145, 155, 0.2);
$line-removed-dark-transparent: rgba(246, 53, 85, 0.2);
$line-number-old: #f9d7dc; $line-number-old: #f9d7dc;
$line-number-new: #ddfbe6; $line-number-new: #ddfbe6;
$line-number-select: #fbf2da; $line-number-select: #fbf2da;
......
...@@ -19,14 +19,6 @@ ...@@ -19,14 +19,6 @@
display: none; display: none;
} }
.monaco-editor .selected-text {
z-index: 1;
}
.monaco-editor .view-lines {
z-index: 2;
}
.is-readonly .editor.original { .is-readonly .editor.original {
.view-lines { .view-lines {
cursor: default; cursor: default;
...@@ -98,11 +90,11 @@ ...@@ -98,11 +90,11 @@
} }
.char-insert { .char-insert {
background-color: $line-added-dark; background-color: $line-added-dark-transparent;
} }
.char-delete { .char-delete {
background-color: $line-removed-dark; background-color: $line-removed-dark-transparent;
} }
.line-numbers { .line-numbers {
...@@ -111,11 +103,11 @@ ...@@ -111,11 +103,11 @@
.view-overlays { .view-overlays {
.line-insert { .line-insert {
background-color: $line-added; background-color: $line-added-transparent;
} }
.line-delete { .line-delete {
background-color: $line-removed; background-color: $line-removed-transparent;
} }
} }
......
---
title: Selection Highlight Oversteps Bounds of Actual Selection in Web IDE
merge_request: 41553
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment