Skip to content

Commit 75c2b47

Browse files
committed
feat: elipse background available for all
1 parent c895d39 commit 75c2b47

4 files changed

Lines changed: 67 additions & 63 deletions

File tree

sites/wonderland/static/img/elipse_background.svg renamed to packages/common-config/static/common/img/elipse_background.svg

File renamed without changes.

packages/common-config/static/common/styles/global.css

Lines changed: 59 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,8 @@ html[data-theme="dark"] {
1717
--wonderland-lila: #a371ce;
1818

1919
/* Optimism Brand Colors */
20-
--op-red: #FF0420;
21-
--op-red-dark: #e6001c;
22-
--op-red-darker: #d9001a;
23-
--op-red-darkest: #b30016;
20+
--op-red: #ff0420;
2421
--op-red-light: #ff1a34;
25-
--op-red-lighter: #ff263f;
26-
--op-red-lightest: #ff475d;
27-
28-
/* Shape, Icons, etc customization */
29-
--wonderland-accent: #978cfb;
3022

3123
/* Wonderland Blue */
3224
--wonderland-blue-50: #f5f7ff;
@@ -145,6 +137,64 @@ html {
145137
overflow: hidden;
146138
position: relative;
147139
}
140+
141+
/* Elypse Background Styles (Only visible for /docs pages) */
142+
html.docs-doc-page::before {
143+
content: "";
144+
position: absolute;
145+
top: 0;
146+
left: 0;
147+
right: 0;
148+
bottom: 0;
149+
background-color: var(--wonderland-accent);
150+
mask: url("/common/img/elipse_background.svg") no-repeat;
151+
-webkit-mask: url("/common/img/elipse_background.svg") no-repeat;
152+
mask-position: right 65%;
153+
-webkit-mask-position: right 65%;
154+
mask-size: contain;
155+
-webkit-mask-size: contain;
156+
pointer-events: none;
157+
z-index: -1;
158+
}
159+
160+
/* Responsive background styles for html::before */
161+
@media (max-width: 1024px) {
162+
html.docs-doc-page::before {
163+
position: fixed;
164+
top: 50%;
165+
left: 50%;
166+
transform: translate(-50%, -50%);
167+
width: 150vw;
168+
height: 150vh;
169+
mask-position: 60% 50%;
170+
-webkit-mask-position: 60% 50%;
171+
mask-size: 80%;
172+
-webkit-mask-size: 80%;
173+
}
174+
}
175+
176+
@media (max-width: 750px) {
177+
html.docs-doc-page::before {
178+
width: 200vw;
179+
height: 200vh;
180+
mask-position: 40% 50%;
181+
-webkit-mask-position: 40% 50%;
182+
mask-size: 100%;
183+
-webkit-mask-size: 100%;
184+
}
185+
}
186+
187+
@media (max-width: 480px) {
188+
html.docs-doc-page::before {
189+
width: 250vw;
190+
height: 250vh;
191+
mask-position: 30% 50%;
192+
-webkit-mask-position: 30% 50%;
193+
mask-size: 120%;
194+
-webkit-mask-size: 120%;
195+
}
196+
}
197+
148198
@media (max-width: 1024px) {
149199
html {
150200
background-size: 110%;

sites/template/src/css/local.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
/* Custom styles for your documentation site */
2+
3+
/* Shape, Icons, etc customization */
4+
/* :root { */
5+
/* --wonderland-accent: #978cfb; */
6+
/* } */

sites/wonderland/src/css/local.css

Lines changed: 3 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,8 @@
11
/* Custom styles for your documentation site */
22

3-
html::before {
4-
content: "";
5-
position: absolute;
6-
top: 0;
7-
left: 0;
8-
right: 0;
9-
bottom: 0;
10-
background-color: var(--wonderland-accent);
11-
mask: url("/img/elipse_background.svg") no-repeat;
12-
-webkit-mask: url("/img/elipse_background.svg") no-repeat;
13-
mask-position: right 65%;
14-
-webkit-mask-position: right 65%;
15-
mask-size: contain;
16-
-webkit-mask-size: contain;
17-
pointer-events: none;
18-
z-index: -1;
19-
}
20-
21-
/* Responsive background styles for html::before */
22-
@media (max-width: 1024px) {
23-
html::before {
24-
position: fixed;
25-
top: 50%;
26-
left: 50%;
27-
transform: translate(-50%, -50%);
28-
width: 150vw;
29-
height: 150vh;
30-
mask-position: 60% 50%;
31-
-webkit-mask-position: 60% 50%;
32-
mask-size: 80%;
33-
-webkit-mask-size: 80%;
34-
}
35-
}
36-
37-
@media (max-width: 750px) {
38-
html::before {
39-
width: 200vw;
40-
height: 200vh;
41-
mask-position: 40% 50%;
42-
-webkit-mask-position: 40% 50%;
43-
mask-size: 100%;
44-
-webkit-mask-size: 100%;
45-
}
46-
}
47-
48-
@media (max-width: 480px) {
49-
html::before {
50-
width: 250vw;
51-
height: 250vh;
52-
mask-position: 30% 50%;
53-
-webkit-mask-position: 30% 50%;
54-
mask-size: 120%;
55-
-webkit-mask-size: 120%;
56-
}
3+
/* Shape, Icons, etc customization */
4+
:root {
5+
--wonderland-accent: #978cfb;
576
}
587

598
/* Wonderland-specific menu icons */

0 commit comments

Comments
 (0)