Skip to content

Commit 8644f3b

Browse files
committed
Better organize paste template with separate CSS file and custom elements.
1 parent 2b1c062 commit 8644f3b

File tree

3 files changed

+285
-224
lines changed

3 files changed

+285
-224
lines changed

block-without-width.html

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<style>
5-
</style>
4+
<link rel='stylesheet' type='text/css' href='paste-template.css'>
65
</head>
76
<body>
87
<script>
@@ -18,8 +17,8 @@
1817
}
1918
</script>
2019
Some not selected text before.
21-
<div style="width:300px; background-color: green; color:yellow;">AREA-SELECTED HEADING</div>
22-
<div>Short area-selected text</div>
20+
<div style="width:300px; background-color: green; color:yellow;">AREA-SELECTED HEADING</div>
21+
<div>Short area-selected text</div>
2322
<script src='paste-template.js'></script>
2423
</body>
2524
</html>

paste-template.css

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#bodyOverlay {
2+
background-color: rgba(0, 0, 0, 0.5);
3+
display: block;
4+
left: 0;
5+
height: 100%;
6+
position: absolute;
7+
top: 0;
8+
width: 100%;
9+
}
10+
11+
#bodyOverlay.hidden {
12+
display: none;
13+
}
14+
15+
paste-toolbar {
16+
display: flex;
17+
position: absolute;
18+
}
19+
20+
paste-toolbar.hidden {
21+
display: none;
22+
}
23+
24+
paste-toolbar > * {
25+
background-color: lightgrey;
26+
border:1px solid grey;
27+
border-radius:2px;
28+
}
29+
30+
paste-overlay {
31+
border: 1px dashed white;
32+
display: block;
33+
overflow: hidden;
34+
position: absolute;
35+
}
36+
37+
paste-overlay.hidden {
38+
display: none;
39+
}
40+
41+
#ceContainer {
42+
border: 1px solid black;
43+
min-height: 200px;
44+
overflow: auto;
45+
padding: 10px;
46+
}

0 commit comments

Comments
 (0)