Skip to content

Commit 737f102

Browse files
Labs - remove inline style commands
Use a new displayNone class instead of embedding styles. Signed-off-by: David A. Wheeler <[email protected]>
1 parent acb86d3 commit 737f102

File tree

6 files changed

+10
-4
lines changed

6 files changed

+10
-4
lines changed

docs/labs/checker.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ pre input, pre textarea {
1212
.markdown-body pre textarea, pre textarea {
1313
resize: both;
1414
}
15+
16+
.displayNone {
17+
display: none;
18+
}

docs/labs/checker.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ function showDebugOutput(debugOutput, alwaysAlert = true) {
9494
// Use textContent to see the raw unfiltered results
9595
debugDataRegion.textContent = (
9696
String(debugDataRegion.textContent) + debugOutputString + "\n\n");
97+
debugDataRegion.classList.remove('displayNone');
98+
// Force display, just in case:
9799
debugDataRegion.style.display = 'block';
98100
if (alwaysAlert) alert(debugOutputString);
99101
} else {

docs/labs/csp1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ <h2>Interactive Lab (<span id="grade"></span>)</h2>
410410
<button type="button" id="giveUpButton">Give up</button>
411411
<br><br>
412412
<pre id="correctStamp"></pre>
413-
<textarea id="debugData" rows="20" cols="70" readonly style="display: none;">
413+
<textarea id="debugData" class="displayNone" rows="20" cols="70" readonly>
414414
</textarea>
415415
</form>
416416
</div><!-- End GitHub pages formatting -->

docs/labs/hello.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ <h2>Interactive Lab (<span id="grade"></span>)</h2>
171171
<button type="button" id="giveUpButton">Give up</button>
172172
<br><br>
173173
<pre id="correctStamp"></pre>
174-
<textarea id="debugData" rows="20" cols="70" readonly style="display: none;">
174+
<textarea id="debugData" class="displayNone" rows="20" cols="70" readonly>
175175
</textarea>
176176
</form>
177177

docs/labs/input1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ <h2>Interactive Lab (<span id="grade"></span>)</h2>
227227
<button type="button" id="giveUpButton">Give up</button>
228228
<br><br>
229229
<pre id="correctStamp"></pre>
230-
<textarea id="debugData" rows="20" cols="70" readonly style="display: none;">
230+
<textarea id="debugData" class="displayNone" rows="20" cols="70" readonly>
231231
</textarea>
232232
</form>
233233

docs/labs/input2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ <h2>Interactive Lab (<span id="grade"></span>)</h2>
218218
<button type="button" id="giveUpButton">Give up</button>
219219
<br><br>
220220
<pre id="correctStamp"></pre>
221-
<textarea id="debugData" rows="20" cols="70" readonly style="display: none;">
221+
<textarea id="debugData" class="displayNone" rows="20" cols="70" readonly>
222222
</textarea>
223223
</form>
224224

0 commit comments

Comments
 (0)