-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy-css.html
65 lines (61 loc) · 925 Bytes
/
my-css.html
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html>
<head>
<title>My CSS</title>
<script src='my-css.js'></script>
<script>
// Configuring it
MyCSS.direction = 'rtl'; // rtl, ltr
MyCSS.rules = {
/*
body > p {
font-size: 1rem;
margin-left: 10rem;
}
body > p {
font-size: 5rem;
margin-right: 10rem;
}
*/
'body > p': {
'font-size': {
ltr: '1rem',
rtl: '5rem',
},
'margin-start': '10rem',
},
/*
.floated-item {
float: left;
text-shadow: 1px 1px #ddd;
}
.floated-item {
float: right;
text-shadow: -1px 1px #ddd;
}
*/
'.floated-item': {
'float': 'start',
'text-shadow': '1px 1px #ddd',
}
};
/*
MyCSS.addRule('body > p', {
fontSize: {
ltr: '1rem',
rtl: '5rem',
},
marginStart: '10rem',
});
MyCSS.addRule('.floated-item', {
float: 'start',
textShadow: '1px 1px #ddd',
});
*/
</script>
</head>
<body>
<p>Hello World ^_~</p>
<div class='floated-item'>Floated Item with shadow</div>
</body>
</html>