Skip to content

Commit 6ba32ef

Browse files
committed
Edit demo css fix
1 parent 3155474 commit 6ba32ef

File tree

1 file changed

+36
-31
lines changed

1 file changed

+36
-31
lines changed

src/Example.vue

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,27 @@
1818
</p>
1919
</div>
2020
</div>
21-
<div class="example"
22-
v-for="(example,index) in examples"
23-
:key="index">
24-
<h3>{{ example.title }}</h3>
25-
<Calendar
26-
v-model="example.value"
27-
:range="example.range"
28-
:lang="example.lang"
29-
:firstDayOfWeek="example.firstDayOfWeek"
30-
:input-class="example.inputClass"
31-
:position="example.position"
32-
:disabled-start-date="example.disabledStartDate"
33-
:text-format="example.textFormat"
34-
:date-format="example.dateFormat"
35-
:disabled-end-date="example.disabledEndDate"/>
36-
<blockquote class="exam-props">
37-
<textarea :value="JSON.stringify(example, null, 2)" readonly>
38-
</textarea>
39-
</blockquote>
21+
<div class="examples">
22+
<div class="example"
23+
v-for="(example,index) in examples"
24+
:key="index">
25+
<h3>{{ example.title }}</h3>
26+
<Calendar
27+
v-model="example.value"
28+
:range="example.range"
29+
:lang="example.lang"
30+
:firstDayOfWeek="example.firstDayOfWeek"
31+
:input-class="example.inputClass"
32+
:position="example.position"
33+
:disabled-start-date="example.disabledStartDate"
34+
:text-format="example.textFormat"
35+
:date-format="example.dateFormat"
36+
:disabled-end-date="example.disabledEndDate"/>
37+
<blockquote class="exam-props">
38+
<textarea :value="JSON.stringify(example, null, 2)" readonly>
39+
</textarea>
40+
</blockquote>
41+
</div>
4042
</div>
4143
</div>
4244
</template>
@@ -117,19 +119,17 @@ export default {
117119
font-family: 'Avenir', Helvetica, Arial, sans-serif;
118120
-webkit-font-smoothing: antialiased;
119121
-moz-osx-font-smoothing: grayscale;
120-
display: flex;
121-
width: 98vw;
122-
padding-top: 50px;
123-
padding-bottom: 200px;
124122
padding-left: 2vw;
125123
padding-right: 2vw;
126-
flex-wrap: wrap;
124+
padding-top: 50px;
125+
padding-bottom: 200px;
127126
}
128127
.titles {
129128
width: 98vw;
130129
border-bottom: 1px solid #dedeee;
131130
padding-bottom: 20px;
132131
text-align: center;
132+
height: 100%;
133133
}
134134
.titles .viewCode {
135135
margin-top: 10px;
@@ -156,7 +156,6 @@ export default {
156156
padding: 10px;
157157
}
158158
.titles .using .code {
159-
width: 40%;
160159
background: #000;
161160
display: block;
162161
align-self: center;
@@ -166,15 +165,20 @@ export default {
166165
margin-top: 30px;
167166
border-radius: 4px;
168167
text-align: left;
168+
max-width: 100%;
169+
word-break: break-all;
170+
}
171+
.examples {
172+
display: grid;
173+
width: 100%;
174+
grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
169175
}
170-
171176
.example {
172-
padding-left: 3vw;
173-
min-width: 30vw;
174-
padding-top: 30px;
177+
padding: 3vw;
175178
border-bottom: 1px solid #eaeaeb;
179+
max-width: 100%;
176180
}
177-
.example:nth-child(3n-1) , .example:nth-child(3n) {
181+
.example:nth-child(3n-1) , .example:nth-child(3n+1) {
178182
border-right: 1px solid #eaeaeb;
179183
}
180184
.example h3 {
@@ -187,11 +191,12 @@ export default {
187191
188192
.example .exam-props textarea{
189193
margin-top: 20px;
190-
height: 200px;
194+
height: 220px;
191195
padding: 7px;
192196
border-radius: 6px;
193197
border-color: #eaeaeb;
194198
resize: none;
195199
width: 95%;
200+
font-size: 13px;
196201
}
197202
</style>

0 commit comments

Comments
 (0)