You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
2.6 KiB
CSS

:root {
--primary: #c5ff27;
--black: black;
--white: white;
--gutter-sm: .5rem;
--gutter-md: 1rem;
--gutter-lg: 3rem;
--font-size-base: 1rem;
}
@font-face {
font-family: "WonderType";
src:
local("WonderType"),
url("WonderType-Regular.otf") format("opentype"),
url("trickster-outline.woff") format("woff");
}
html,
body {
width: 100%;
height: 100%;
margin: 0 0;
padding: 0 0;
}
* {
box-sizing: border-box;
}
body {
background-color: var(--primary);
font-family: "WonderType";
}
.container {
max-width: 900px;
margin: 0 auto;
padding: var(--gutter-md);
text-align: center;
}
button,
.button {
width: 100%;
display: inline-flex;
align-items: center;
justify-content: center;
text-transform: uppercase;
background-color: var(--black);
border: none;
padding: var(--gutter-sm) var(--gutter-md);
color: var(--white);
font-weight: bolder;
font-size: var(--font-size-base);
transition: .2s all ease-in-out;
font-family: "WonderType";
}
audio {
display: none;
}
.button__wrapper {
display: flex;
justify-content: flex-center;
flex-direction: column;
width: 100%;
padding: var(--gutter-lg);
gap: var(--gutter-md);
text-align: center;
}
a {
color: var(--black);
}
.button--record {
border-radius: 100%;
max-width: 500px;
max-height: 500px;
aspect-ratio: 1 / 1;
width: calc(100% - var(--gutter-lg) - var(--gutter-lg));
position: relative;
background-color: transparent;
}
@keyframes recording {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.button--record:before {
content: '';
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-color: var(--black);
border-radius: 100%;
z-index: -1;
transform: scale(1);
transition: transform .1s linear;
}
.button--record[active="true"]:before {
transform: scale(0);
}
.button--record[active="true"] {
color: var(--black);
animation-delay: 1s;
border: none;
border: 1rem dashed black;
border-right-color: transparent;
border-left-color: transparent;
background-color: transparent;
animation: 2s linear recording infinite;
}
.button--record[active="true"] .button__label {
animation: 2s linear recording infinite;
animation-direction: reverse;
}
.recorder {
display: flex;
flex-direction: column;
height: 100%;
justify-content: space-between;
align-items: center;
}