Skip to content

Commit dace31e

Browse files
committed
Add water breathing code kata.
1 parent b11d8c3 commit dace31e

File tree

3 files changed

+448
-0
lines changed

3 files changed

+448
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ with.
1010

1111
## My JavaScript Demos - I Love JavaScript!
1212

13+
* [Code Kata: Water Breathing Exercise In JavaScript](https://bennadel.github.io/JavaScript-Demos/demos/water-breathing/)
1314
* [Tracking User Interactions And Analytics With Small Abstractions In AngularJS](https://bennadel.github.io/JavaScript-Demos/demos/tracking-user-interactions-angularjs/)
1415
* [Brute-Force Refreshing View-Data In The Background In Angular 11.0.5](https://bennadel.github.io/JavaScript-Demos/demos/load-data-in-background-angular11/dist/)
1516
* [Restoring ActiveElement Focus After A User-Interaction In JavaScript](https://bennadel.github.io/JavaScript-Demos/demos/restoring-active-element/)

demos/water-breathing/demo.css

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
2+
html {
3+
box-sizing: border-box ;
4+
}
5+
6+
html *,
7+
html *:before,
8+
html *:after {
9+
box-sizing: inherit ;
10+
}
11+
12+
body {
13+
font-family: sans-serif ;
14+
font-size: 18px ;
15+
}
16+
17+
.states {
18+
align-items: stretch ;
19+
background-color: #ffffff ;
20+
bottom: 0px ;
21+
display: flex ;
22+
justify-content: stretch ;
23+
left: 0px ;
24+
padding: 30px 30px 30px 30px ;
25+
position: fixed ;
26+
right: 0px ;
27+
top: 0px ;
28+
}
29+
30+
.states__state {
31+
align-items: center ;
32+
background-color: #f0f0f0 ;
33+
border-radius: 10px 10px 10px 10px ;
34+
display: none ;
35+
justify-content: center ;
36+
padding: 30px 30px 30px 30px ;
37+
width: 100% ;
38+
}
39+
40+
.states__state--active {
41+
display: flex ;
42+
}
43+
44+
.states__content {
45+
text-align: center ;
46+
width: 580px ;
47+
}
48+
49+
.title {
50+
margin: 0px 0px 30px 0px ;
51+
}
52+
53+
.buttons {
54+
display: flex ;
55+
justify-content: center ;
56+
margin: 30px 0px 20px 0px ;
57+
}
58+
59+
.button {
60+
background-color: #ffffff ;
61+
border: 1px solid #121212 ;
62+
border-radius: 40px 40px 40px 40px ;
63+
cursor: pointer ;
64+
font-size: 100% ;
65+
padding: 10px 20px 10px 20px ;
66+
}
67+
68+
.button:hover {
69+
background-color: #121212 ;
70+
color: #ffffff ;
71+
}
72+
73+
.meter {
74+
border: 2px solid steelblue ;
75+
border-radius: 50% 50% 50% 50% ;
76+
box-shadow: 0px 0px 7px 3px #ffffff ;
77+
display: flex ;
78+
flex-direction: column ;
79+
height: 200px ;
80+
justify-content: flex-end ;
81+
margin: 0px auto 0px auto ;
82+
overflow: hidden ;
83+
width: 200px ;
84+
}
85+
86+
.meter__bar {
87+
background-color: lightsteelblue ;
88+
height: 0% ;
89+
transition-duration: 0s ; /* To be set in the JavaScript. */
90+
transition-property: height ;
91+
transition-timing-function: ease-in-out ;
92+
}
93+

0 commit comments

Comments
 (0)