breath-web-app
Version:
A Web & Mobile App to help you focus on and calm your breathing.
135 lines (114 loc) • 2.16 kB
CSS
/*!
Breath Web App | © Nick Freear | License: GPL-3.0+.
*/
:root {
--teal: #008080;
--dark-teal: rgb(0, 32, 48); /* Hex: #004050; */
--dark-teal-a: rgba(0,64,80,1);
--darker-teal: rgba(0,32,48,1);
--off-white: #DDD;
--silver: #C0C0C0;
--mid-grey: #999;
--zoom: 1;
}
/* Counter-intuitively, larger fonts on big-screens! (iPad+) */
@media (min-width: 767px) {
:root {
--zoom: 1.5;
}
}
html, body, svg, main {
height: 100%;
width: 100%;
}
body {
/* https://cssgradient.io/ */
background: var(--dark-teal);
background: linear-gradient(180deg, var(--darker-teal) 0%, var(--dark-teal-a) 95%, var(--dark-teal-a) 99%);
color: #fff;
font: 1.2rem sans-serif;
font-size: calc(var(--zoom) * 1.1rem);
margin: 0;
transition: all 1s;
}
[ role = button ],
button,
a {
color: var(--off-white);
cursor: pointer;
}
button:hover,
a:focus,
a:hover {
color: #eee;
transition: all 3s;
}
/* https://css-tricks.com/making-pure-css-playpause-button/
*/
#pause-btn {
background: transparent;
bottom: 1.2rem;
display: none;
left: 1.2rem;
position: absolute;
height: calc(var(--zoom) * 2rem);
width: 1rem;
border-style: solid;
border-width: 1rem;
border-color: var(--mid-grey);
border-style: double;
border-width: 0 0 0 calc(var(--zoom) * 1.6rem);
box-sizing: border-box;
}
.is-playing #pause-btn {
display: block;
}
#pause-btn:focus,
#pause-btn:hover {
border-color: #eee;
}
a#fork-me {
border-bottom: 3px dotted transparent;
bottom: .5rem;
letter-spacing: .1rem;
padding: .8rem;
position: absolute;
right: .5rem;
text-decoration: none;
}
a#fork-me:focus,
a#fork-me:hover {
background: #003040;
border-color: var(--mid-grey);
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
border: 0;
}
a .beta {
color: var(--mid-grey);
display: none;
font-style: italic;
}
.app-about {
transition: all 1s;
}
.app-about--close .app-about {
height: 1px;
min-height: 0;
}
/* SVG styles.
*/
svg #breath {
fill: var(--silver);
}
.Off-White {
fill: var(--off-white);
}
/* End */