learn-morse-code/src/scss/App.scss
2020-01-21 02:04:46 -08:00

270 lines
5.6 KiB
SCSS

$main-bg-color: #FFF;
$main-box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.2);
$main-border-radius: 0px;
$border-radius-neumorphic: 0px -6px 10px rgba(255, 255, 255, 1), 0px 4px 15px rgba(0, 0, 0, 0.15);
$border-radius-neumorphic-active: 0 15px 20px rgba(0, 0, 0, 0.015), inset 0px -2px 5px rgb(255, 255, 255), inset 0px 2px 5px rgba(0, 0, 0, 0.15);
html, body {
margin: 0px;
padding: 0px;
height: 100%;
width: 100%;
box-sizing: border-box;
background: $main-bg-color;
// background: #444
}
#root {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
.mode-picker {
display: flex;
align-self: center;
button {
background: #fcfcfc;
margin: 15px;
padding: 5px;
box-shadow: $main-box-shadow;
border: 0px;
border-radius: $main-border-radius;
}
.selected {
box-shadow: $border-radius-neumorphic;
}
}
#legend {
width: 450px;
display: flex;
justify-content: space-evenly;
position: absolute;
align-self: left;
flex-wrap: wrap;
div {
width: 80px;
display: flex;
flex-wrap: nowrap;
button {
width: 40px;
margin: 4px;
}
}
}
#main-content {
width: 95vw;
border: 1px solid red;
display: flex;
flex-direction: column;
}
#morseButton {
width: 100px;
height: 100px;
margin: 30px;
// background: goldenrod;
border-radius: 50px;
align-self: center;
display: flex;
justify-content: center;
align-items: center;
transition: all 500ms ease-in-out;
}
#morseButton.showPaddles {
width: 239px;
background: transparent;
box-shadow: 0px 0px 0px transparent;
}
.paddle {
font-size: 60px;
width: 100px;
height: 100px;
background: goldenrod;
margin: 0px;
border: 0px;
transition: all 500ms ease-in-out;
}
.paddle#left {
border-radius: 20% 0 0 20%;
}
.paddle#right {
border-radius: 0 20% 20% 0;
}
.paddle.showPaddles {
width: 250px;
height: 100px;
}
.paddle#left.showPaddles{
margin-right: 7px;
}
.paddle#right.showPaddles{
margin-left: 7px;
}
#challengeWord {
display: flex;
justify-content: center;
align-items: center;
// border: 1px solid green;
height: 50px;
margin-bottom: 20px;
padding-left: 10px;
padding-right: 10px;
width: fit-content;
display: flex;
font-size: 40px;
font-family: 'Courier';
font-weight: bold;
background: #EEE;
text-transform: uppercase;
align-self: center;
span {
padding: 4px;
margin: 1px;
}
}
.strike {
text-decoration: line-through;
}
#morseBufferDisplay, #challengeBufferDisplay {
display: flex;
justify-content: center;
border: 1px solid green;
flex-direction: column;
align-items: center;
width: 100%;
// height: 40px;
margin-bottom: 20px;
#alphanumeric-container {
// border-left: 2px solid #000;
padding-left: 5px;
width: 50%;
display: flex;
justify-content: center;
#alphanumeric {
font-size: 40px;
font-family: 'Courier';
font-weight: bold;
background-color: transparent;
&:first-child {
padding-left: 5px;
padding-right: 5px;
// box-shadow: $main-box-shadow;
}
}
}
#ditDahs {
width: 50%;
padding-right: 5px;
// border-right: 2px solid #000;
display: flex;
flex-direction: row;
justify-content: center;
.ditDah {
background: #DDD;
height: 40px;
width: 30px !important;
margin-left: 3px;
// box-shadow: 0px 1px 0px #000;
border-radius: $main-border-radius;
box-shadow: $main-box-shadow;
display: flex;
justify-content: center;
align-items: center;
font-size: 35px;
font-family: 'Courier';
font-weight: bold;
}
}
}
.space {
font-size: 20px;
}
.morseError {
background: rgba(255,0,0,0.4);
color: rgb(120, 0, 0);
border-radius: 5px;
// text-decoration: line-through;
}
.correct {
background: rgba(0,255,0,0.4);
// color: rgb(120, 0, 0);
border-radius: 5px;
}
#morseDisplay {
/* border: 1px solid blue; */
display: flex;
flex-direction: column;
.morseCard:nth-child(1){
opacity: 100%;
}
.morseCard:nth-child(2){
opacity: 70%;
}
.morseCard:nth-child(3){
opacity: 50%;
}
.morseCard:nth-child(4){
opacity: 30%;
}
.morseCard:nth-child(5){
opacity: 10%;
}
}
.morseCard {
display: flex;
flex-direction: row !important;
justify-content: center;
/* border: 1px solid orange; */
margin-bottom: 2px;
font-size: 2.5rem;
font-family: 'Courier';
font-weight: bold;
/* width: 100%; */
div div {
// border: 1px solid purple;
cursor: default;
padding: 5px;
margin: 3px;
background: #EEE;
// width: 50%;
white-space: nowrap;
border-radius: $main-border-radius;
box-shadow: $main-box-shadow;
line-height: 2rem;
}
.ditDahs-container, .alphanumeric-container {
display: flex;
width: 50%;
}
.ditDahs-container {
justify-content: flex-end;
}
.ditDahs {
// border: 1px solid red;
display: flex;
justify-content: flex-end;
align-items: center;
overflow-wrap: break-word;
}
}