Skip to content

Commit 9b96405

Browse files
Merge pull request #54 from eigilnikolajsen/fix/styles
tighten styles
2 parents 9a1cc12 + 5c44c5b commit 9b96405

File tree

6 files changed

+48
-75
lines changed

6 files changed

+48
-75
lines changed

src/css/non_essential.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ button:active {
2323

2424
:focus,
2525
input:focus + label {
26-
animation: flicker 60ms 2;
27-
}
28-
29-
[contenteditable="true"]:focus {
30-
animation: flicker 200ms 2;
26+
animation: flicker 50ms 2;
3127
}
3228

3329
@keyframes flicker {

src/css/section_2.css

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,20 @@ td > div > input + label {
5656
display: block;
5757
}
5858

59-
#section_2 input {
59+
#section_2 input[type="radio"] {
6060
width: 0;
6161
height: 0;
6262
opacity: 0;
6363
-webkit-user-modify: read-only;
6464
}
65-
66-
#section_2 input:focus:checked + label {
67-
background-color: var(--text);
65+
#section_2 input[type="radio"]:focus:checked + label {
66+
background: var(--text);
6867
color: var(--bg);
69-
transform: scale(4);
68+
scale: 4;
7069
z-index: 2;
7170
}
72-
73-
#section_2 input:checked + label::before {
74-
display: none;
75-
}
76-
77-
#section_2 input:checked + label:hover::before {
78-
display: block;
79-
background: var(--bg50);
71+
#section_2 input[type="radio"]:checked + label {
72+
scale: 1;
73+
background: var(--bg);
74+
color: var(--text);
8075
}

src/css/section_5.css

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -18,54 +18,6 @@ form > div {
1818
position: relative;
1919
}
2020

21-
form input,
22-
input[type="file"] {
23-
-webkit-appearance: none;
24-
appearance: none;
25-
background-color: var(--text);
26-
margin: 0;
27-
padding: 0;
28-
border: none;
29-
color: var(--text);
30-
width: 0;
31-
height: 0;
32-
position: relative;
33-
opacity: 0;
34-
display: block;
35-
}
36-
37-
form input[type="radio"] + label {
38-
position: relative;
39-
z-index: 1;
40-
cursor: pointer;
41-
height: 100%;
42-
display: inline-block;
43-
}
44-
45-
form input[type="radio"] + label::before {
46-
z-index: -1;
47-
content: "";
48-
position: absolute;
49-
top: 0;
50-
left: 0;
51-
bottom: 0;
52-
right: 0;
53-
background-color: var(--bg);
54-
}
55-
56-
form input[type="radio"]:focus:checked + label::before {
57-
background-color: var(--text);
58-
}
59-
60-
form input[type="radio"]:focus:checked + label {
61-
color: var(--bg);
62-
}
63-
64-
form input[type="radio"]:checked + label::before {
65-
background: var(--bg25);
66-
background-position: 1px 0.5px;
67-
}
68-
6921
#canvas {
7022
transform-origin: top left;
7123
}

src/css/section_7.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ button:focus a {
5858
position: relative;
5959
}
6060
.button_link:hover {
61+
background: var(--bg75);
62+
color: var(--bg);
63+
text-decoration: none;
64+
}
65+
.button_link:focus:active,
66+
.button_link:active {
6167
background: var(--bg50);
6268
color: var(--bg);
6369
text-decoration: none;

src/css/style.css

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,18 +153,42 @@ h1 {
153153
outline: none;
154154
}
155155

156-
form input:hover + label {
157-
text-decoration: none;
156+
form input[type="radio"],
157+
input[type="file"] {
158+
-webkit-appearance: none;
159+
appearance: none;
160+
background-color: var(--text);
161+
color: var(--text);
162+
border: none;
163+
width: 0;
164+
height: 0;
165+
opacity: 0;
166+
display: block;
167+
}
168+
form input[type="radio"] + label {
169+
cursor: pointer;
170+
display: inline-block;
171+
}
172+
form input[type="radio"]:focus:checked + label {
173+
background-color: var(--text);
158174
color: var(--bg);
159-
outline: none;
160175
}
161-
162-
form input:hover + label::before {
163-
background: var(--bg50);
176+
form input[type="radio"]:checked + label {
177+
background: var(--bg25);
164178
}
165-
166-
form input:checked:hover + label::before {
179+
form input[type="radio"]:hover + label,
180+
form input[type="radio"]:checked:hover + label {
167181
background: var(--bg75);
182+
color: var(--bg);
183+
}
184+
form input[type="radio"]:focus:hover + label {
185+
background: var(--text);
186+
}
187+
form input[type="radio"]:focus + label:active,
188+
form input[type="radio"]:checked + label:active,
189+
form input[type="radio"] + label:active {
190+
background: var(--bg50);
191+
color: var(--bg);
168192
}
169193

170194
ul li,

src/js/nav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function enterTextField() {
6565
active.blur()
6666
active.focus()
6767
insideTextField = true
68-
}, 40)
68+
}, 50)
6969
}
7070
function exitTextField() {
7171
// console.log("exitTextField")

0 commit comments

Comments
 (0)