Skip to content

Commit 80501c0

Browse files
author
markzegarelli
committed
Update CSS for form and code
1 parent dd43453 commit 80501c0

File tree

4 files changed

+74
-32
lines changed

4 files changed

+74
-32
lines changed

src/_sass/components/_markdown.scss

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -476,25 +476,22 @@ div.highlighter-rouge {
476476
margin-left: 3px
477477
}
478478

479-
.sample-code-container {
480-
display: grid;
481-
grid-template-columns: 1fr 1fr;
482-
gap: 10px;
483-
padding: 5px;
484-
overflow: scroll;
485-
}
479+
// .sample-code-container {
480+
// display: grid;
481+
// grid-template-columns: 1fr 1fr;
482+
// gap: 10px;
483+
// padding: 5px;
484+
// overflow: scroll;
485+
// }
486+
487+
// .output {
488+
// outline: 1px solid color(gray-600);
489+
// outline-offset: 4px
490+
// }
491+
// .output-code {
492+
// display: block;
493+
// font: 12px color(code-gray) "Droid Sans Mono", "Lucida Console", "Monaco", monospace;
494+
// word-wrap: break-word;
495+
// }
486496

487-
.output {
488-
outline: 1px solid color(gray-600);
489-
outline-offset: 4px
490-
}
491-
.output-code {
492-
display: block;
493-
font: 12px color(code-gray) "Droid Sans Mono", "Lucida Console", "Monaco", monospace;
494-
word-wrap: break-word;
495-
}
496497

497-
.form {
498-
outline: 1px solid color(gray-600);
499-
outline-offset: 4px;
500-
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.sample-code-container {
2+
display: grid;
3+
grid-template-columns: 1fr 2fr;
4+
gap: 10px;
5+
padding: 5px;
6+
overflow: scroll;
7+
}
8+
9+
.output {
10+
11+
max-width: 100%;
12+
overflow: scroll;
13+
}
14+
15+
.form, .output {
16+
outline: 1px solid color(gray-400);
17+
outline-offset: 4px;
18+
padding: 10px;
19+
}
20+
.output-code {
21+
display: block;
22+
font: 12px color(code-gray) "Droid Sans Mono", "Lucida Console", "Monaco", monospace;
23+
word-wrap: break-word;
24+
}
25+
26+
.sample-form {
27+
display: grid;
28+
grid-template-columns: 50px 1fr;
29+
grid-gap: 16px;
30+
margin-top: 6px;
31+
align-items: center;
32+
33+
label {
34+
grid-column: 1 / 2;
35+
text-align: right;
36+
font-size: 12px;
37+
}
38+
39+
input, button {
40+
grid-column: 2 / 3;
41+
}
42+
}
43+

src/_sass/segment.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
@import "components/release-note";
9999
@import "components/quickinfo";
100100
@import "components/current-version";
101+
@import "components/sample-form";
101102

102103
// Pages
103104
// =================================================

src/connections/spec/page.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Here's a complete example of a `page` call:
109109
</script>
110110
<script>
111111
function showOutput() {
112-
var show = document.getElementById("output-code");
112+
var show = document.getElementById("output_container");
113113
if (show.style.display === "block") {
114114
show.style.display = "none";
115115
} else {
@@ -120,20 +120,21 @@ Here's a complete example of a `page` call:
120120

121121
<div class="sample-code-container">
122122
<div class="form">
123-
<h3> Sample Page </h3>
124-
<p><b>See what your page call looks like</b></p>
125-
<label for="name">Name:</label>
126-
<input type="text" id="name"><br>
127-
<label for="title">Title:</label>
128-
<input type="text" id="title"><br>
129-
<label for="url">URL:</label>
130-
<input type="text" id="url"><br>
131-
<input type="submit" id="submit" onclick="showMessage(); showOutput()" value="See a sample page call">
123+
<h4> Sample Web Form </h4>
124+
<div class="sample-form">
125+
<label for="name">Name:</label>
126+
<input type="text" class="input" id="name">
127+
<label for="title">Title:</label>
128+
<input type="text" class="input" id="title">
129+
<label for="url">URL:</label>
130+
<input type="text" class="input" id="url">
131+
<input type="submit" class= "button button-hollow" id="submit" onclick="showMessage(); showOutput()" value="See a sample page call">
132+
</div>
132133
</div>
133134

134135
<div class="output">
135-
<h3>Sample Page Call</h3>
136-
<pre class="language-javascript"><code class="language-javascript" id="output_container">
136+
<h4>Sample Page Call</h4>
137+
<pre class="language-javascript code-output"><code class="language-javascript" id="output_container">
137138

138139
</code></pre>
139140
</div>

0 commit comments

Comments
 (0)