Skip to content

Commit

Permalink
add animated buttons
Browse files Browse the repository at this point in the history
add alternate bg svg image for light mode
  • Loading branch information
nyakotey committed Dec 28, 2021
1 parent 05c0c4f commit 96417c1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
1 change: 1 addition & 0 deletions img/bg-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 30 additions & 2 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@
--color-muted: rgba(255, 255, 255, 0.15);
--color-banner: #2f8bfc;
--color-text: hsl(0deg, 0%, 100%);
--body-bg: url("img/bg.svg") var(--color-bg) center no-repeat;
}
.light{
--color-bg: #bddaff;
--color-text: rgb(255, 255, 255);
--color-text: rgb(7, 3, 46);
--body-bg: url("img/bg-dark.svg") var(--color-bg) center no-repeat;
}

body {
background: url("img/bg.svg") var(--color-bg) center no-repeat;
background: var(--body-bg);
background-size: cover;
background-blend-mode: soft-light;
transition: background 0.2s, color 0.2s;
Expand Down Expand Up @@ -146,7 +148,29 @@ body {
font-size: 0.2em;
}

@media screen and (min-width: 700px) {
.controls-row{
display: flex;
flex-flow: column nowrap;
margin-bottom: 5vh;
gap: .5em;
}
.subtitle{
background: linear-gradient(-45deg, #0756b5, #80affa);
padding: .5em 1em;
border-radius: 0.3em;
/* border-top: 10px inset yellow;
border-left: 10px inset yellow; */
box-shadow: 2px 10px 3px -1px rgba(255, 255, 255, 0.205) inset;
animation: bg 3s ease infinite alternate;
}

@keyframes bg {
from{filter: hue-rotate(-75deg);}
to{filter: hue-rotate(75deg);}
}
/* and (min-width: 700px) */
@media screen and (min-width: 730px) and (orientation: landscape) {
body{overflow-y: hidden;}
.banner{
width: 20em;
padding: 1em 5rem;
Expand All @@ -159,4 +183,8 @@ body {
width: 1.8em;
height: 1.8em;
}
.controls-row{
flex-flow: row nowrap;
gap: 4em;
}
}

0 comments on commit 96417c1

Please sign in to comment.