-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.js
48 lines (40 loc) · 891 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import Bau from "@grucloud/bau";
import BauCss from "@grucloud/bau-css";
const bau = Bau({});
const { p, h1, div } = bau.tags;
const bauCss = BauCss();
const { css, keyframes, createGlobalStyles } = bauCss;
const color = "red";
const rotate = keyframes`
0% {transform: rotate(0deg);}
100% {transform: rotate(360deg);}
`;
const classRoot = css`
border: ${color} dotted 1px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
& h1 {
&:hover {
animation: ${rotate} 4s infinite;
}
}
`;
createGlobalStyles`
body {
margin: 0;
padding: 0;
background: teal;
font-family: Open-Sans, Helvetica, Sans-Serif;
}
`;
const App = () =>
div(
{
class: classRoot,
},
h1("Hello BauCss"),
p("Hover over the title to start the animation")
);
document.getElementById("app").replaceChildren(App({}));