Skip to content

Commit d3c4ec1

Browse files
committed
Move copy buttons next to headings
1 parent c8a6395 commit d3c4ec1

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

html-api-debugger/interactivity.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ class="html-api-debugger-container html-api-debugger--grid"
106106
</details>
107107
<div class="full-width html-api-debugger--grid">
108108
<div>
109-
<h2>Interpreted by HTML API</h2>
110-
<div><button type="button" data-wp-on-async--click="handleCopyTreeClick" name="tree__html-api">Copy tree 📋</button></div>
109+
<div class="heading-and-button">
110+
<h2>Interpreted by HTML API</h2>
111+
<button type="button" data-wp-on-async--click="handleCopyTreeClick" name="tree__html-api">Copy tree 📋</button>
112+
</div>
111113
<div
112114
data-wp-on-async--mouseover="handleSpanOver"
113115
data-wp-on-async--mouseleave="clearSpan"
@@ -119,8 +121,10 @@ class="html-api-debugger-container html-api-debugger--grid"
119121
</div>
120122
</div>
121123
<div>
122-
<h2>Interpreted from DOM</h2>
123-
<div><button type="button" data-wp-on-async--click="handleCopyTreeClick" name="tree__dom">Copy tree 📋</button></div>
124+
<div class="heading-and-button">
125+
<h2>Interpreted from DOM</h2>
126+
<button type="button" data-wp-on-async--click="handleCopyTreeClick" name="tree__dom">Copy tree 📋</button>
127+
</div>
124128
<div data-wp-class--mutated="state.hasMutatedDom"><ul id="dom_tree" data-wp-ignore></ul></div>
125129
</div>
126130
</div>

html-api-debugger/style.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@
116116
.highlight-span {
117117
outline: 2px solid #0000ff77;
118118
}
119+
120+
.heading-and-button {
121+
display: flex;
122+
justify-content: space-between;
123+
align-items: center;
124+
125+
button {
126+
height: 100%;
127+
}
128+
}
119129
}
120130

121131
#rendered_iframe {

0 commit comments

Comments
 (0)