Skip to content

Classy UI #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
220 changes: 220 additions & 0 deletions css/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions css/main.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

161 changes: 161 additions & 0 deletions css/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
$colors: (
primary: #e7dfc6,
primary-light: lighten(#e7dfc6, 20%),
accent: #816c61,
background: #131b23
);
$desktop: 950px;
@function color($color-name) {
@return map-get($colors, $color-name);
}
@mixin desktop {
@media (min-width: #{$desktop}) {
@content;
}
}

html {
height: 100%;
}
body {
background-color: color(primary);
width: 100%;
height: 100%;
margin: 0;
font-family: Cinzel, serif;
font-size: 1.5em;
letter-spacing: 0.4em;
overflow: hidden;
.background {
display: none;
@include desktop {
display: block;
position: absolute;
z-index: -1;
top: -50%;
left: 0;
width: 80%;
height: 200%;
background-color: color(background);
border-radius: 0 50% 50% 0;
}
}
form {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-evenly;
align-items: center;
margin: 0;
@include desktop {
display: grid;
grid-template-columns: 80% auto;
grid-template-rows: 1fr 1fr;
}
#messageWrapper,
#nameWrapper {
display: flex;
justify-content: center;
cursor: pointer;
align-items: center;
border-radius: 50%;
height: 200px;
width: 200px;
color: color(primary);
background-color: color(background);
box-shadow: 0 0 6px color(background);
transition: all 0.3s ease;
@include desktop {
width: 500px;
height: auto;
cursor: auto;
background-color: unset;
box-shadow: unset;
border-radius: 0;
display: block;
margin: auto;
font-size: 2em;
}
input {
margin-top: 10px;
display: none;
border-radius: 5px;
background-color: color(primary);
box-shadow: none;
border: none;
outline: unset;
padding: 10px;
transition: background-color 0.3s ease;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
@include desktop {
display: block;
}
}
input:focus {
background-color: color(primary-light);
}
input#message {
width: 200px;
}
}
#messageWrapper.active,
#nameWrapper.active {
position: absolute;
z-index: 1;
flex-direction: column;
border-radius: 0;
width: 100%;
height: 100%;
}
button.submit {
position: relative;
z-index: 0;
background-color: color(background);
color: color(primary);
font-family: inherit;
font-size: inherit;
letter-spacing: inherit;
border-radius: 5px;
border: none;
padding: 10px 30px;
@include desktop {
grid-column: 2;
grid-row: 1 / 3;
span {
writing-mode: vertical-rl;
text-orientation: upright;
}
}
}
button[disabled].submit::before {
position: absolute;
content: " ";
width: 80%;
height: 1px;
background-color: color(primary);
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
@include desktop {
width: 1px;
height: 90%;
}
}
button.submit::before {
width: 0%;
}
button:enabled.submit {
box-shadow: 0 5px 0 color(accent);
}
button:enabled.submit:hover,
button:enabled.submit:focus {
transform: translateY(2px);
box-shadow: 0 3px 0 color(accent);
}
button:enabled.submit:active {
transform: translateY(5px);
box-shadow: 0 0px 0 color(accent);
}
}
}
Loading