@@ -30,20 +30,16 @@ code-input {
30
30
31
31
32
32
code-input : not (.code-input_loaded ) {
33
- margin : 0px !important ;
34
- margin-bottom : calc (-1 * var (--padding , 16px ))!important ;
35
33
padding : var (--padding , 16px )!important ;
36
- border : 0 ;
37
34
}
38
35
39
36
code-input textarea , code-input : not (.code-input_pre-element-styled ) pre code , code-input .code-input_pre-element-styled pre {
40
37
/* Both elements need the same text and space styling so they are directly on top of each other */
41
38
margin : 0px !important ;
42
39
padding : var (--padding , 16px )!important ;
43
40
border : 0 ;
44
- min-width : 100% ;
45
- min-height : 100% ;
46
- box-sizing : border-box; /* Don't need to worry about padding to calculate width! */
41
+ min-width : calc (100% - var (--padding ) * 2 );
42
+ min-height : calc (100% - var (--padding ) * 2 );
47
43
overflow : hidden;
48
44
resize : none;
49
45
grid-row : 1 ;
@@ -87,13 +83,6 @@ code-input pre {
87
83
z-index : 0 ;
88
84
}
89
85
90
- code-input : not (.code-input_loaded ) pre , code-input : not (.code-input_loaded ) textarea {
91
- opacity : 0 ;
92
- }
93
- code-input : not (.code-input_loaded )::before {
94
- color : # ccc ;
95
- }
96
-
97
86
/* Make textarea almost completely transparent, except for caret and placeholder */
98
87
99
88
code-input textarea {
@@ -119,11 +108,29 @@ code-input textarea {
119
108
outline : none!important ;
120
109
}
121
110
122
- code-input : not (.code-input_registered )::before {
111
+ /* Before registering give a hint about how to register. */
112
+ code-input : not (.code-input_registered ) {
113
+ overflow : hidden;
114
+ display : block;
115
+ box-sizing : border-box; /* Include padding in width/height */
116
+ }
117
+
118
+ code-input : not (.code-input_registered )::after {
123
119
/* Display message to register */
124
120
content : "Use codeInput.registerTemplate to set up." ;
125
121
display : block;
126
- color : grey;
122
+ position : absolute;
123
+ bottom : var (--padding );
124
+ left : var (--padding );
125
+ width : calc (100% - 2 * var (--padding ));
126
+
127
+ border-top : 1px solid grey;
128
+ outline : var (--padding ) solid white;
129
+ background-color : white;
130
+ }
131
+
132
+ code-input : not (.code-input_loaded ) pre , code-input : not (.code-input_loaded ) textarea {
133
+ opacity : 0 ;
127
134
}
128
135
129
136
/* Contains dialog boxes that might appear as the result of a plugin.
0 commit comments