Skip to content

Commit 71479ef

Browse files
committed
[refactor] improve initial theme state
1 parent 9ea9897 commit 71479ef

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

css/form.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ label {
7676
input[type="color"] {
7777
border: 0;
7878
height: 2.5em;
79-
min-width: 2.5em;
8079
display: block;
8180
cursor: pointer;
8281
-webkit-appearance: none;

css/theme.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@
1919
box-shadow: 0 0 0.25em 0 rgba(var(--accent), 0.6), 0 0 0.5em 0 rgba(var(--accent), 0.4);
2020
}
2121

22-
.theme-input {
22+
.theme-input[type="color"] {
2323
opacity: 0;
2424
width: 2px;
25-
min-width: 2px;
2625
height: 2px;
2726
position: absolute;
2827
top: 0;
2928
left: 0;
3029
}
3130

32-
.theme-input:focus+.theme-label {
31+
.theme-input[type="color"]:focus+.theme-label {
3332
background-color: var(--gray-03);
3433
border-bottom-color: rgb(var(--accent));
3534
color: var(--white);

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@
5454
<button class="button mb-0 control-link-list" tabindex="1">
5555
<span class="button-text">List</span>
5656
</button>
57-
<button class="button mb-0 control-link-blocks active" tabindex="1">
57+
<button class="button mb-0 control-link-blocks" tabindex="1">
5858
<span class="button-text">Block</span>
5959
</button>
6060
</div>
6161
<div class="head-item mb-3 mb-xl-0">
6262
<form class="theme">
63-
<input id="accent-picker" type="color" class="theme-input" value="#ffaa33" tabindex="1">
63+
<input id="accent-picker" type="color" class="theme-input" value="#000000" tabindex="1">
6464
<label class="button mb-0 theme-label" for="accent-picker">
6565
<span class="button-text">Accent</span>
6666
</label>

0 commit comments

Comments
 (0)