Popup preview fixes (#948)
* Select just the text node and not its container * Make background color transparent by default
This commit is contained in:
parent
ecbac2c5ea
commit
9bda0a9eb4
@ -16,16 +16,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
html {
|
html {
|
||||||
--text-color: #333333;
|
transition: background-color 0.25s linear 0s, color 0.25s linear 0s;
|
||||||
--background-color: #ffffff;
|
background-color: rgba(255, 255, 255, 0);
|
||||||
--theme-transition: background-color 0.25s linear 0s, color 0.25s linear 0s;
|
color: #333333;
|
||||||
transition: var(--theme-transition);
|
|
||||||
background-color: var(--background-color);
|
|
||||||
color: var(--text-color);
|
|
||||||
}
|
}
|
||||||
html.dark {
|
html.dark {
|
||||||
--text-color: #d4d4d4;
|
color: #d4d4d4;
|
||||||
--background-color: #1e1e1e;
|
background-color: #1e1e1e;
|
||||||
}
|
}
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
@ -99,7 +96,9 @@ body {
|
|||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background-color: var(--background-color);
|
}
|
||||||
|
.example-text-input:not([hidden])+.example-text {
|
||||||
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-placeholder {
|
.popup-placeholder {
|
||||||
|
@ -224,7 +224,7 @@ class PopupPreviewFrame {
|
|||||||
if (textNode === null) { return; }
|
if (textNode === null) { return; }
|
||||||
|
|
||||||
const range = document.createRange();
|
const range = document.createRange();
|
||||||
range.selectNode(textNode);
|
range.selectNodeContents(textNode);
|
||||||
const source = new TextSourceRange(range, range.toString(), null, null);
|
const source = new TextSourceRange(range, range.toString(), null, null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user