-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- code refactor - added HSV, CMKYK and LAB support - added Google Font dependency
- Loading branch information
1 parent
3a623a8
commit a4560e6
Showing
19 changed files
with
713 additions
and
438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,62 @@ | ||
:root { | ||
--cc-fsd: 10; | ||
--cc-color-item-input-font-size: { | ||
font-size: calc(100vw / var(--cc-fsd)); | ||
|
||
@media (min-width: 1000px) { | ||
font-size: calc(1000px / var(--cc-fsd)); | ||
} | ||
.color-items { | ||
display: grid; | ||
grid-template-columns: auto; | ||
max-width: 800px; | ||
padding-top: 1rem; | ||
list-style: none; | ||
|
||
@media (min-width: 768px) { | ||
grid-template-columns: [col] 50% [col] 50%; | ||
padding-top: 0; | ||
} | ||
} | ||
|
||
.cc-color-item { | ||
.color-item { | ||
display: flex; | ||
font-size: 36px; | ||
min-height: 48px; | ||
margin-bottom: 0.5rem; | ||
|
||
&.-hex { | ||
--cc-fsd: 7; | ||
@apply --cc-color-item-input-font-size; | ||
margin: -0.1em 0 -0.2em; | ||
} | ||
|
||
&.-rgb { | ||
--cc-fsd: 12; | ||
@apply --cc-color-item-input-font-size; | ||
} | ||
font-size: 36px; | ||
|
||
&.-hsl { | ||
--cc-fsd: 13; | ||
@apply --cc-color-item-input-font-size; | ||
} | ||
& input { | ||
text-transform: uppercase; | ||
} | ||
|
||
&.-hwb { | ||
--cc-fsd: 13; | ||
@apply --cc-color-item-input-font-size; | ||
@media (min-width: 768px) { | ||
font-size: 144px; | ||
grid-column: col / span 2; | ||
margin: 0; | ||
} | ||
} | ||
} | ||
|
||
/* | ||
.cc-color-item__label { | ||
.color-item__btn { | ||
display: flex; | ||
align-items: center; | ||
font-size: 0.75rem; | ||
padding: 0 0.5rem 0 1rem; | ||
|
||
& > span { | ||
width: 10px; | ||
writing-mode: vertical-lr; | ||
transform: rotate(180deg); | ||
& button { | ||
display: flex; | ||
width: 60px; | ||
|
||
& > * { | ||
display: flex; | ||
align-items: center; | ||
} | ||
} | ||
} | ||
*/ | ||
|
||
.cc-color-item__btn { | ||
order: 1; | ||
& svg { | ||
margin-right: 0.25rem; | ||
} | ||
} | ||
|
||
.cc-color-item__input-wrapper { | ||
flex: 1; | ||
order: 2; | ||
.color-item__input { | ||
display: flex; | ||
position: relative; | ||
overflow: hidden; | ||
|
||
& input { | ||
letter-spacing: -2px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
footer { | ||
display: flex; | ||
font-size: 0.75rem; | ||
padding: 1.5rem 1rem 0; | ||
|
||
& > .footer__info { | ||
display: flex; | ||
align-items: center; | ||
position: relative; | ||
padding-left: 1rem; | ||
margin-left: 1rem; | ||
|
||
& > :not(:last-child) { | ||
margin-right: 1rem; | ||
} | ||
|
||
&::before { | ||
content: ''; | ||
position: absolute; | ||
left: 0; | ||
top: 25%; | ||
bottom: 25%; | ||
border-left-width: 1px; | ||
border-left-style: dotted; | ||
} | ||
|
||
@media (min-width: 768px) { | ||
padding-left: 2rem; | ||
margin-left: 2rem; | ||
|
||
& > :not(:last-child) { | ||
margin-right: 1.5rem; | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
header { | ||
position: relative; | ||
font-style: italic; | ||
padding: 0 1rem; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.