Skip to content

Commit 21bbe96

Browse files
22 - Recreating Codepen Finished
1 parent 4595f66 commit 21bbe96

File tree

1 file changed

+106
-0
lines changed

1 file changed

+106
-0
lines changed

22 - Recreating Codepen/style-START.css

+106
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
:root {
2+
--grey: #343436;
3+
--yellow: #ffc600;
4+
}
5+
16
html {
27
box-sizing: border-box;
38
font-family: "Lato", "Lucida Grande", "Lucida Sans Unicode", Tahoma,
@@ -28,3 +33,104 @@ h6 {
2833
font-size: 1.5em;
2934
}
3035

36+
.codepen {
37+
display: grid;
38+
grid-template-rows: auto 1fr 1fr auto;
39+
height: 100vh;
40+
}
41+
42+
/* Target all decendants of .codepen */
43+
.codepen >* {
44+
border: 1px solid black;
45+
color: white;
46+
}
47+
48+
/* Editor */
49+
.code {
50+
display: grid;
51+
grid-template-columns: repeat(3, 1fr);
52+
background: #1b2b34;
53+
}
54+
55+
.editor {
56+
display: grid;
57+
grid-template-rows: auto 1fr;
58+
}
59+
60+
.editor__header {
61+
display: grid;
62+
grid-template-columns: auto 1fr auto;
63+
align-items: center;
64+
padding: 5px;
65+
grid-gap: 5px;
66+
background: rgba(0, 0, 0, 0.1);
67+
}
68+
69+
.editor__code {
70+
display: grid;
71+
grid-template-columns: auto 1fr;
72+
}
73+
74+
.editor__number {
75+
display: block;
76+
padding: 0 10px;
77+
}
78+
79+
.editor__input {
80+
resize: none;
81+
background: none;
82+
border: 0;
83+
color: grey;
84+
line-height: 20px;
85+
}
86+
87+
88+
/* Pen Header */
89+
.pen {
90+
display: grid;
91+
grid-template-columns: 1fr;
92+
grid-auto-flow: column;
93+
align-items: center;
94+
grid-gap: 10px;
95+
background: black;
96+
border-bottom: 5px solid var(--grey);
97+
color: white;
98+
padding: 10px;
99+
}
100+
101+
.preview {
102+
display: grid;
103+
}
104+
105+
/* Button */
106+
.button {
107+
background: var(--grey);
108+
border: 0;
109+
color: white;
110+
padding: 10px;
111+
border-radius: 5px;
112+
font-size: 15px;
113+
position: relative;
114+
}
115+
116+
.button--small {
117+
font-size: 12px;
118+
padding: 4px;
119+
}
120+
121+
.button--dirty:before {
122+
background: var(--yellow);
123+
display: block;
124+
content: '';
125+
height: 2px;
126+
width: calc(100% - 6px);
127+
position: absolute;
128+
left: 3px;
129+
top: 3px;
130+
}
131+
132+
.settings {
133+
padding: 5px;
134+
background: black;
135+
border-top: 1px solid grey;
136+
}

0 commit comments

Comments
 (0)