-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
151 lines (130 loc) · 5.4 KB
/
Copy pathstyles.css
File metadata and controls
151 lines (130 loc) · 5.4 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/* Main page styles */
body {
margin: 0;
padding: 2rem;
min-height: 200vh; /* Make page taller to enable scrolling */
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background:
radial-gradient(circle at 20% 30%, rgba(127, 255, 221, 0.3), transparent 40%),
linear-gradient(120deg, rgba(255, 218, 122, 0.3), rgba(125, 211, 252, 0.3) 60%, rgba(196, 181, 253, 0.3)),
linear-gradient(45deg,
rgba(255, 107, 107, 0.3), rgba(78, 205, 196, 0.3), rgba(69, 183, 209, 0.3),
rgba(150, 206, 180, 0.3), rgba(254, 202, 87, 0.3), rgba(255, 159, 243, 0.3),
rgba(84, 160, 255, 0.3), rgba(95, 39, 205, 0.3), rgba(0, 210, 211, 0.3), rgba(255, 159, 67, 0.3)),
url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="%23ffffff" stroke-width="1" opacity="0.15"/></pattern><pattern id="dots" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="2" fill="%23ffffff" opacity="0.2"/></pattern></defs><rect width="100%25" height="100%25" fill="%23000"/><rect width="100%25" height="100%25" fill="url(%23grid)"/><rect width="100%25" height="100%25" fill="url(%23dots)"/><circle cx="200" cy="150" r="120" fill="%23ff6b6b" opacity="0.6"/><circle cx="1000" cy="200" r="80" fill="%234ecdc4" opacity="0.6"/><circle cx="600" cy="500" r="150" fill="%2345b7d1" opacity="0.6"/><circle cx="300" cy="600" r="100" fill="%23feca57" opacity="0.6"/><circle cx="900" cy="650" r="90" fill="%2396ceb4" opacity="0.6"/><rect x="100" y="300" width="180" height="120" fill="%23ff9ff3" opacity="0.6" transform="rotate(25 190 360)"/><rect x="800" y="400" width="150" height="100" fill="%2354a0ff" opacity="0.6" transform="rotate(-35 875 450)"/><rect x="500" y="100" width="200" height="80" fill="%235f27cd" opacity="0.6" transform="rotate(15 600 140)"/><polygon points="150,500 250,450 200,550" fill="%2300d2d3" opacity="0.6"/><polygon points="950,300 1050,250 1000,350" fill="%23ff9f43" opacity="0.6" transform="rotate(45 1000 300)"/><text x="600" y="80" text-anchor="middle" fill="%23ffffff" font-size="32" font-family="Arial" opacity="0.9" font-weight="bold">LIQUID GLASS DEMO</text><text x="600" y="120" text-anchor="middle" fill="%23ffffff" font-size="18" font-family="Arial" opacity="0.7">Complex patterns reveal displacement and blur effects</text><text x="100" y="200" fill="%23ffffff" font-size="16" font-family="monospace" opacity="0.8" transform="rotate(-10 100 200)">Sharp edges</text><text x="1000" y="400" fill="%23ffffff" font-size="16" font-family="monospace" opacity="0.8" transform="rotate(10 1000 400)">Grid lines</text><text x="600" y="700" text-anchor="middle" fill="%23ffffff" font-size="14" font-family="Arial" opacity="0.6">Geometric shapes and text elements make glass effects clearly visible</text></svg>');
background-attachment: fixed; /* Fix background in place */
background-size: 100% 100%, 100% 100%, 400% 400%, cover;
background-position: 0% 0%, 0% 0%, 0% 50%, center;
animation: gradientShift 15s ease infinite;
}
@keyframes gradientShift {
0% { background-position: 0% 0%, 0% 0%, 0% 50%; }
50% { background-position: 0% 0%, 0% 0%, 100% 50%; }
100% { background-position: 0% 0%, 0% 0%, 0% 50%; }
}
.container {
max-width: 1200px;
margin: 0 auto;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 3rem;
align-items: start;
}
.section {
padding: 2rem;
}
h1 {
text-align: center;
color: white;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
margin-bottom: 2rem;
font-size: 2.5rem;
font-weight: 300;
}
h2 {
color: white;
margin-top: 0;
margin-bottom: 1.5rem;
font-weight: 500;
}
.example {
margin-bottom: 2rem;
}
.example h3 {
color: rgba(255, 255, 255, 0.9);
margin-bottom: 1rem;
font-size: 1.1rem;
font-weight: 500;
}
/* CSS Class Implementation */
.liquid-glass {
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 16px;
color: white;
padding: 1rem 1.5rem;
margin-bottom: 1rem;
display: inline-block;
text-decoration: none;
transition: all 0.2s ease;
backdrop-filter:
url("#liquid-refraction")
blur(16px)
saturate(1.15)
contrast(1.05)
brightness(1.05);
-webkit-backdrop-filter:
blur(16px)
saturate(1.15)
contrast(1.05)
brightness(1.05);
box-shadow:
0 10px 30px rgba(0,0,0,.12),
inset 0 1px 0 rgba(255,255,255,.25);
}
.liquid-glass:hover {
filter: brightness(1.03);
transform: translateY(-2px);
}
.liquid-glass:active {
filter: brightness(.98) contrast(1.03);
transform: translateY(0);
}
.liquid-glass[data-elevated="true"] {
border-color: color-mix(in oklab, white 75%, transparent);
}
/* Web Component Styling */
liquid-glass {
color: white;
margin-bottom: 1rem;
display: inline-block;
}
liquid-glass::part(surface) {
padding: 1rem 1.5rem;
transition: all 0.2s ease;
}
liquid-glass:hover::part(surface) {
transform: translateY(-2px);
}
liquid-glass:active::part(surface) {
transform: translateY(0);
}
.code-block {
background: rgba(0, 0, 0, 0.3);
border-radius: 8px;
padding: 1rem;
margin-top: 1rem;
font-family: 'Monaco', 'Menlo', monospace;
font-size: 0.85rem;
color: rgba(255, 255, 255, 0.8);
overflow-x: auto;
}
@media (max-width: 768px) {
.container {
grid-template-columns: 1fr;
gap: 2rem;
}
body {
padding: 1rem;
}
}