-
Notifications
You must be signed in to change notification settings - Fork 10
/
Glossy.html
84 lines (68 loc) · 1.93 KB
/
Glossy.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
:root {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Helvetica Neue", "sans-serif";
}
main {
background-color: lightgrey;
}
button {
color: lightgrey;
}
.portrait {
font-weight: bold;
text-decoration: none;
text-transform: uppercase;
background: darkblue;
padding: 4em 1em 4em 1em;
border-radius: .5em;
}
.landscape {
font-weight: bold;
text-decoration: none;
text-transform: uppercase;
background: darkred;
padding: 1em 3em 1em 3em;
border-radius: .5em;
}
.port {
--glossy-stretch: 600%;
}
.land {
--glossy-stretch: 300%;
}
.glossy {
/* assume we have display: block; or inline-block*/
position:relative;
}
.glossy::before {
content: ' ';
position: absolute;
width: 100%;
height: 100%;
border-radius: inherit;
background-image: radial-gradient(circle at 100% 100%, transparent 0%, transparent 90%, white 90%, white 100%);
top: 0;
left: 0;
opacity: .3;
background-size: var(--glossy-stretch, 600%) 200%;
}
</style>
</head>
<body>
<main>
<button class="portrait glossy" >Default</button>
<button class="portrait glossy port" >Glossy</button>
<button class="portrait glossy" >Ugly Glossy Button</button>
<button class="portrait glossy land" >Land Glossy Button</button>
<button class="landscape glossy land" >Landscape</button>
</main>
</body>
</html>