Skip to content

Commit 9659416

Browse files
committed
Make keyboard navigation instructions correct size with new scrolling
1 parent bea73fa commit 9659416

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

code-input.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,8 @@ Sticks to the top of the code-input element */
152152
code-input .code-input_dialog-container {
153153
z-index: 2;
154154

155-
position: sticky;
156155
grid-row: 1;
157156
grid-column: 1;
158-
159-
top: 0;
160-
left: 0;
161157

162158
margin: 0;
163159
padding: 0;
@@ -167,6 +163,10 @@ code-input .code-input_dialog-container {
167163
/* Dialog boxes' text is based on text-direction */
168164
text-align: inherit;
169165
}
166+
code-input.code-input_pre-element-styled .code-input_dialog-container {
167+
width: calc(100% + 2 * var(--padding));
168+
}
169+
170170
[dir=rtl] code-input .code-input_dialog-container, code-input[dir=rtl] .code-input_dialog-container {
171171
left: unset;
172172
right: 0;
@@ -192,6 +192,7 @@ code-input .code-input_dialog-container .code-input_keyboard-navigation-instruct
192192
overflow: hidden;
193193
text-overflow: ellipsis;
194194
width: calc(100% - 12px);
195+
box-sizing: content-box; /* Make height, width work consistently no matter the box-sizing of ancestors. */
195196
max-height: 3em;
196197
}
197198
code-input:has(pre[dir=rtl]) .code-input_dialog-container .code-input_keyboard-navigation-instructions {

plugins/prism-line-numbers.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,3 @@ code-input.line-numbers textarea, code-input.line-numbers.code-input_pre-element
1414
code-input.line-numbers, .line-numbers code-input {
1515
grid-template-columns: calc(100% - max(0em, calc(3.8em - var(--padding, 16px))));
1616
}
17-
18-
/* Make keyboard navigation still fill width */
19-
code-input .code-input_dialog-container .code-input_keyboard-navigation-instructions {
20-
width: calc(100% + max(3.8em, var(--padding, 16px)))!important;
21-
}

0 commit comments

Comments
 (0)