Skip to content

Commit d6ee3a7

Browse files
committed
template files for contributors
1 parent 86e197a commit d6ee3a7

File tree

3 files changed

+90
-25
lines changed

3 files changed

+90
-25
lines changed

css-cookbook/center.html

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
<!doctype html>
2-
32
<html lang="en">
43

54
<head>
65
<meta charset="utf-8">
7-
86
<title>CSS Cookbook: center an element</title>
9-
107
<link rel="stylesheet" href="styles.css">
118
<style>
129
.container {
@@ -21,19 +18,18 @@
2118
}
2219
</style>
2320

24-
<style class="editable">
25-
.container {
26-
height: 200px;
27-
display: flex;
28-
align-items: center;
29-
justify-content: center;
30-
}
31-
32-
.item {
33-
width: 10em;
34-
}
35-
</style>
21+
<style class="editable">
22+
.container {
23+
height: 200px;
24+
display: flex;
25+
align-items: center;
26+
justify-content: center;
27+
}
3628

29+
.item {
30+
width: 10em;
31+
}
32+
</style>
3733
</head>
3834

3935
<body>
@@ -43,7 +39,7 @@
4339
</div>
4440
</section>
4541

46-
<textarea class="playable playable-css" style="height: 170px;">
42+
<textarea class="playable playable-css" style="height: 170px;">
4743
.container {
4844
height: 200px;
4945
display: flex;
@@ -54,20 +50,18 @@
5450
.item {
5551
width: 10em;
5652
}
57-
</textarea>
58-
59-
<textarea class="playable playable-html" style="height: 70px;">
60-
<div class="container">
61-
<div class="item">I am centered!</div>
62-
</div>
63-
</textarea>
53+
</textarea>
6454

55+
<textarea class="playable playable-html" style="height: 70px;">
56+
<div class="container">
57+
<div class="item">I am centered!</div>
58+
</div>
59+
</textarea>
6560

6661
<div class="playable-buttons">
6762
<input id="reset" type="button" value="Reset">
6863
</div>
6964
</body>
7065
<script src="playable.js"></script>
7166

72-
73-
</html>
67+
</html>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!doctype html>
2+
3+
<html lang="en">
4+
5+
<head>
6+
<meta charset="utf-8">
7+
<!-- this is an example from the MDN Layout Cookbook -->
8+
<title>CSS Cookbook: download template</title>
9+
10+
11+
<style>
12+
/* body rules included when showing the example as a live example */
13+
body {
14+
background-color: #fff;
15+
color: #333;
16+
font: 1.2em / 1.5 Helvetica Neue, Helvetica, Arial, sans-serif;
17+
padding: 0;
18+
margin: 0;
19+
}
20+
21+
/* add all of your example CSS rules here */
22+
</style>
23+
24+
25+
26+
</head>
27+
28+
<body>
29+
30+
<!-- Add your example HTML here -->>
31+
32+
</body>
33+
34+
</html>

css-cookbook/cookbook-template.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>CSS Cookbook: template</title>
7+
<link rel="stylesheet" href="styles.css">
8+
<style>
9+
/* CSS the visitor will not change */
10+
</style>
11+
12+
<style class="editable">
13+
/* CSS the visitor can play with */
14+
</style>
15+
</head>
16+
17+
<body>
18+
<section class="preview">
19+
<!-- HTML for your component here. -->
20+
</section>
21+
22+
<textarea class="playable playable-css" style="height: 170px;">
23+
<!-- repeat the second block of CSS here. You can tweak the height to make more room for the content. -->
24+
</textarea>
25+
26+
<textarea class="playable playable-html" style="height: 70px;">
27+
<!-- repeat the HTML for your component here. You can tweak the height to make more room for the content. -->
28+
</textarea>
29+
30+
<!-- leave everything below here alone -->
31+
<div class="playable-buttons">
32+
<input id="reset" type="button" value="Reset">
33+
</div>
34+
</body>
35+
<script src="playable.js"></script>
36+
37+
</html>

0 commit comments

Comments
 (0)