HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<svg xmlns="http://www.w3.org/2000/svg" width="763.89543" height="628.23639" viewBox="0 0 763.89543 628.23639" id="svg">
<path d="M452.78073,486.84415c0-38.92181,31.57371-131.28134,70.52186-131.28134s70.52186,92.35953,70.52186,131.28134a70.52188,70.52188,0,0,1-141.04372,0Z" transform="translate(-218.05228 -135.88181)" fill="#f2f2f2" class="leaf__fill" />
<path d="M523.30257,658.29978a.57968.57968,0,0,1-.57989-.5795V414.74851a.57989.57989,0,0,1,1.15977,0V657.72028A.57967.57967,0,0,1,523.30257,658.29978Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M523.30257,461.65594a.57826.57826,0,0,1-.41007-.16977l-27.91244-27.89342a.57968.57968,0,0,1,.82014-.81944l27.91243,27.89342a.57949.57949,0,0,1-.41006.98921Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M523.30257,509.94505a.5795.5795,0,0,1-.41007-.98921l46.74444-46.71305a.57968.57968,0,0,1,.82014.81944l-46.74445,46.713A.57831.57831,0,0,1,523.30257,509.94505Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M332.78073,445.69205c0-48.26367,39.15191-162.791,87.44824-162.791s87.44825,114.52731,87.44825,162.791a87.44827,87.44827,0,0,1-174.89649,0Z" transform="translate(-218.05228 -135.88181)" fill="#e6e6e6" class="leaf__fill--secondary" />
<path d="M420.22894,658.29978a.7188.7188,0,0,1-.71906-.71858V356.29229a.71907.71907,0,0,1,1.43813,0V657.5812A.71881.71881,0,0,1,420.22894,658.29978Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M420.22894,414.45826a.717.717,0,0,1-.50849-.21052l-34.61187-34.58829a.71881.71881,0,0,1,1.017-1.01612l34.61187,34.5883a.71858.71858,0,0,1-.50849,1.22663Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M420.22894,474.33753a.71859.71859,0,0,1-.50849-1.22664L477.68431,415.186a.71881.71881,0,1,1,1.017,1.01612L420.73743,474.127A.71718.71718,0,0,1,420.22894,474.33753Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M218.05228,362.42742c0-67.16541,54.44833-226.54561,121.61374-226.54561S461.27976,295.262,461.27976,362.42742a121.61374,121.61374,0,0,1-243.22748,0Z" transform="translate(-218.05228 -135.88181)" fill="#6c63ff" class="primary__fill" />
<path d="M339.666,658.29978a1,1,0,0,1-1-1V238.0156a1,1,0,1,1,2,0V657.29978A1,1,0,0,1,339.666,658.29978Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M339.666,318.9614a.99683.99683,0,0,1-.70715-.293l-48.13452-48.13428a1,1,0,0,1,1.4143-1.41406l48.13452,48.13427a1,1,0,0,1-.70715,1.707Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M339.666,402.29147a1,1,0,0,1-.70715-1.707l80.61-80.61035a1,1,0,1,1,1.41431,1.41406l-80.61,80.61036A.997.997,0,0,1,339.666,402.29147Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M980.94772,659.04355h-743a1,1,0,0,1,0-2h743a1,1,0,0,1,0,2Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M921.9886,579.87648a2.61659,2.61659,0,1,0,0-5.23318H897.131V564.17693H921.9886a2.61659,2.61659,0,1,0,0-5.23318h-211.944a2.61659,2.61659,0,0,0,0,5.23318h24.85763V574.6433H710.04462a2.61659,2.61659,0,0,0,0,5.23318h24.85763v10.46637H710.04462a2.61659,2.61659,0,0,0,0,5.23319h24.85763v10.46637h-22.241a5.23319,5.23319,0,0,0,0,10.46637h21.17294a3.90011,3.90011,0,0,0-.2402,1.30829v36.6323a3.92489,3.92489,0,0,0,7.84978,0v-36.6323a3.9001,3.9001,0,0,0-.24019-1.30829H890.82969a3.90011,3.90011,0,0,0-.2402,1.30829v36.6323a3.92489,3.92489,0,0,0,7.84978,0v-36.6323a3.9001,3.9001,0,0,0-.24019-1.30829H919.372a5.23319,5.23319,0,1,0,0-10.46637H897.131V595.576H921.9886a2.6166,2.6166,0,1,0,0-5.23319H897.131V579.87648ZM740.13543,564.17693H891.89779V574.6433H740.13543Zm151.76236,41.86548H740.13543V595.576H891.89779Zm0-15.69956H740.13543V579.87648H891.89779Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M536.33633,614.26677a8.32226,8.32226,0,0,0-8.48768-9.52919l-53.30176-53.89249L464.01726,565.565l55.70488,48.346a8.36731,8.36731,0,0,0,16.61419.35584Z" transform="translate(-218.05228 -135.88181)" fill="#ffb8b8" />
<path d="M507.08761,587.14767l-9.6045,9.58952a3.49655,3.49655,0,0,1-4.90761.01977l-37.17527-36.54824a13.63679,13.63679,0,1,1,19.31844-19.25013l32.39985,41.28752A3.49807,3.49807,0,0,1,507.08761,587.14767Z" transform="translate(-218.05228 -135.88181)" fill="#6c63ff" class="primary__fill" />
<circle cx="245.32254" cy="357.53429" r="19.02708" fill="#ffb8b8" />
<polygon points="181.031 589.544 185.849 597.728 219.711 583.041 212.601 570.961 181.031 589.544" fill="#ffb8b8" />
<path d="M400.52653,721.76483l9.48783,16.11879.00038.00065a11.91934,11.91934,0,0,1-4.2263,16.31844l-.33382.19647-15.53428-26.39126Z" transform="translate(-218.05228 -135.88181)" fill="#2f2e41" class="secondary__fill" />
<polygon points="236.852 619.03 246.35 619.03 250.868 582.396 236.851 582.397 236.852 619.03" fill="#ffb8b8" />
<path d="M452.482,751.811l18.70386-.00076h.00075a11.91936,11.91936,0,0,1,11.91969,11.9195v.38734l-30.62373.00113Z" transform="translate(-218.05228 -135.88181)" fill="#2f2e41" class="secondary__fill" />
<path d="M416.72132,732.717a3.48078,3.48078,0,0,1-2.80748-1.42l-9.15968-12.44037a3.48577,3.48577,0,0,1,.87115-4.96585l40.75932-27.2237L421.791,622.00047l52.59276,4.3402,1.77141,55.57084a27.92416,27.92416,0,0,1-13.97933,25.11828L418.463,732.24868A3.47526,3.47526,0,0,1,416.72132,732.717Z" transform="translate(-218.05228 -135.88181)" fill="#2f2e41" class="secondary__fill" />
<path d="M455.1912,747.47458a3.486,3.486,0,0,1-3.47739-3.362l-1.92745-54.13646,23.86679-1.25735-1.9004,54.52531a3.47624,3.47624,0,0,1-3.25345,3.35672l-13.07112.86623C455.34893,747.47231,455.26987,747.47458,455.1912,747.47458Z" transform="translate(-218.05228 -135.88181)" fill="#2f2e41" class="secondary__fill" />
<path d="M472.47042,637.091c-6.07228,0-19.28176-6.82994-26.64486-9.26446-1.10151.88136-7.1528,5.40616-14.21632,4.57928-4.35836-.51142-8.19529-2.97846-11.40411-7.333C413.1191,615.45573,427.41,579.90447,436,547c3.61375-13.84221,11.86591-28.00323,25.85811-24.965h0a26.782,26.782,0,0,1,20.20972,19.65992c1.61727,6.58332.226,14.32715-.78981,19.9822a27.15741,27.15741,0,0,0-.72589,5.79048c.49855,3.98842-4.7318,66.539-6.51267,69.21029C473.84976,636.96234,473.30128,637.091,472.47042,637.091Z" transform="translate(-218.05228 -135.88181)" fill="#6c63ff" class="primary__fill" />
<path d="M458.25637,637.20175a8.32219,8.32219,0,0,0,.72944-12.74025l.376-75.798-17.85247,2.97277,5.24405,73.57219a8.36731,8.36731,0,0,0,11.503,11.99329Z" transform="translate(-218.05228 -135.88181)" fill="#ffb8b8" />
<path d="M462.38541,597.3414H443.15633a3.49655,3.49655,0,0,1-3.48608-3.45431l-.47208-52.13014a13.63679,13.63679,0,1,1,27.27212.03328l-.599,52.10518A3.49807,3.49807,0,0,1,462.38541,597.3414Z" transform="translate(-218.05228 -135.88181)" fill="#6c63ff" class="primary__fill" />
<path d="M458.53,512.36391a19.30481,19.30481,0,0,1-18.43973-15.44973,22.21133,22.21133,0,0,1,.71214-10.08154,27.07831,27.07831,0,0,1,37.13478-17.0065c2.3305,1.05458,4.626,2.5692,5.69309,4.894s.39924,5.57409-1.9351,6.62016c-1.52547.68361-3.43977.34792-4.79312,1.32916-1.9439,1.40944-1.4435,4.409-.57548,6.64767s1.84976,4.94785.39467,6.85782c-1.35587,1.77975-4.0661,1.72452-6.20086,1.05463s-4.24185-1.79167-6.46757-1.56348c-3.24624.33281-5.57907,3.5618-6.01087,6.79636s.58469,6.46779,1.58825,9.5729Z" transform="translate(-218.05228 -135.88181)" fill="#2f2e41" class="secondary__fill" />
<path d="M530.10905,613.82592c12.36-2.79412,26.36283,6.8741,26.79686,19.8534.12208,3.6507-.94786,7.48453-3.757,9.96811a9.24468,9.24468,0,0,1-8.76843,2.08223c-5.76937-1.92854-6.0774-9.96779-2.98251-14.26152,4.19058-5.81385,12.49239-6.80657,19.07988-6.11508a45.21218,45.21218,0,0,1,22.13147,9.21687c12.85879,9.68972,21.0467,24.54042,27.674,38.88878a196.07067,196.07067,0,0,1,14.68736,46.155q.5606,3.00176,1.02714,6.01978a1.17021,1.17021,0,0,0,1.44076.791,1.19172,1.19172,0,0,0,.791-1.44076,198.65981,198.65981,0,0,0-14.90069-50.40251c-6.93921-15.54987-15.68747-31.67941-29.60435-42.05678a47.20629,47.20629,0,0,0-23.80026-9.54278c-7.29887-.64807-15.94187.89605-20.48082,7.24411-3.58083,5.008-3.21708,13.33107,2.32352,16.81889a10.57431,10.57431,0,0,0,10.07942.20263,12.90878,12.90878,0,0,0,6.80637-8.43731c1.96732-7.20859-1.02-15.00556-6.14179-20.15813a25.81243,25.81243,0,0,0-18.16767-7.64005,22.87667,22.87667,0,0,0-4.884.58228c-1.45914.32986-.80705,2.5611.64975,2.23178Z" transform="translate(-218.05228 -135.88181)" fill="#ccc" />
<path d="M589.716,756.57146l-7.6808-13.114,9.471-5.54736,7.68081,13.11356v.00041a5.488,5.488,0,0,1-9.471,5.54737Z" transform="translate(-218.05228 -135.88181)" fill="#6c63ff" class="primary__fill" />
<circle cx="346.26758" cy="586.67703" r="6.75446" fill="#6c63ff" class="primary__fill" />
<path d="M619.43416,756.57146l-7.68081-13.114,9.47084-5.54736,7.68081,13.11356a5.488,5.488,0,0,1-9.47084,5.54778Z" transform="translate(-218.05228 -135.88181)" fill="#6c63ff" class="primary__fill" />
<path d="M565.60316,736.16626A14.36941,14.36941,0,0,1,579.95639,721.813h45.43616a6.07374,6.07374,0,0,1,6.06661,6.06681V733.05a17.48924,17.48924,0,0,1-17.46951,17.4695H579.95639A14.36941,14.36941,0,0,1,565.60316,736.16626Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M576.08115,758.26255V743.065h10.976v15.19754a5.488,5.488,0,1,1-10.976,0Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M607.93047,758.26255V743.065h10.976v15.19754a5.488,5.488,0,1,1-10.976,0Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M652.5873,698.13449a6.75447,6.75447,0,0,1,10.53252,8.45915l-11.10263,13.82392-10.53252-8.45915Z" transform="translate(-218.05228 -135.88181)" fill="#6c63ff" />
<path d="M625.84272,725.3668l8.89465-11.07476a13.02371,13.02371,0,0,1,18.28863-1.99662l2.77906,2.232a15.52808,15.52808,0,0,1,2.38056,21.80552l-7.32818,9.12434a4.87612,4.87612,0,0,1-6.84731.74739L626.59024,732.214A4.876,4.876,0,0,1,625.84272,725.3668Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M653.90905,696.48879a4.64369,4.64369,0,1,1,7.2411,5.81566l-12.42437,15.46963-7.24111-5.81567Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<path d="M636.11026,722.34682l19.09018,15.3322a6.75446,6.75446,0,1,1-8.45914,10.53252l-19.09019-15.3322Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<ellipse cx="655.82011" cy="746.6838" rx="2.84954" ry="1.58308" transform="translate(-555.06748 654.56026) rotate(-51.23045)" fill="#6c63ff" class="primary__fill" />
<circle cx="608.64341" cy="395.5706" r="14.22415" fill="#2f2e41" class="secondary__fill" />
<polygon points="573.245 517.272 567.017 517.271 564.054 493.249 573.246 493.249 573.245 517.272" fill="#a0616a" />
<path d="M562.56864,515.49179h12.0112a0,0,0,0,1,0,0v7.56261a0,0,0,0,1,0,0H555.006a0,0,0,0,1,0,0v0A7.56261,7.56261,0,0,1,562.56864,515.49179Z" fill="#2f2e41" class="secondary__fill" />
<polygon points="563.523 513.796 557.581 511.931 561.946 488.123 570.716 490.875 563.523 513.796" fill="#a0616a" />
<path d="M770.68739,645.27531H782.6986a0,0,0,0,1,0,0v7.56261a0,0,0,0,1,0,0H763.12478a0,0,0,0,1,0,0v0A7.56261,7.56261,0,0,1,770.68739,645.27531Z" transform="translate(11.74615 -337.52782) rotate(17.42262)" fill="#2f2e41" class="secondary__fill" />
<path d="M783.6018,640.09265a2.26665,2.26665,0,0,1-.7986-.14536l-4.58185-1.718a2.294,2.294,0,0,1-1.42951-2.63329c1.15356-5.18672,5.085-22.84537,7.23772-32.31689,2.55317-11.23466,39.79856-13.32225,41.38272-13.40559l.13023-.00695,4.18981,5.2651c1.514,4.86624,1.03411,8.66189-1.42629,11.28179-7.1793,7.6439-28.61462,2.90069-31.17065,2.30041l-11.39316,29.90684A2.29261,2.29261,0,0,1,783.6018,640.09265Z" transform="translate(-218.05228 -135.88181)" fill="#2f2e41" class="secondary__fill" />
<path d="M790.20587,643.64869a2.26688,2.26688,0,0,1-.7986-.14536l-4.58184-1.718a2.294,2.294,0,0,1-1.42951-2.6333c1.15355-5.18671,5.085-22.84536,7.23771-32.31688,2.55317-11.23466,39.79856-13.32225,41.38273-13.40559l.13022-.00695,4.18981,5.2651c1.514,4.86624,1.03411,8.66189-1.42629,11.28179-7.1793,7.6434-28.6145,2.90069-31.17065,2.30041l-11.39316,29.90684A2.29261,2.29261,0,0,1,790.20587,643.64869Z" transform="translate(-218.05228 -135.88181)" fill="#2f2e41" class="secondary__fill" />
<path d="M776.94959,570.48574a5.346,5.346,0,0,1,.44952.712l25.055,2.63971,3.60663-4.94492,8.17417,4.46765L807.151,585.3599l-30.72793-7.83473a5.33192,5.33192,0,1,1,.52651-7.03943Z" transform="translate(-218.05228 -135.88181)" fill="#a0616a" />
<path d="M835.17365,600.70288a2.28629,2.28629,0,0,1-1.04118-.2545c-5.01011-2.54747-14.7659-6.95928-23.81251-7.88252a2.23129,2.23129,0,0,1-1.57251-.889,2.29546,2.29546,0,0,1-.42355-1.78348c.81633-4.519,2.689-16.026,2.44776-25.24846a12.495,12.495,0,0,1,9.43977-12.42977h0a40.572,40.572,0,0,1,5.03578-.99269,12.59622,12.59622,0,0,1,14.00029,14.61111c-1.61332,9.55735-3.23966,22.90589-1.82615,32.22412a2.28952,2.28952,0,0,1-.92386,2.20913A2.24987,2.24987,0,0,1,835.17365,600.70288Z" transform="translate(-218.05228 -135.88181)" fill="#ccc" />
<path d="M811.23538,576.394a2.28406,2.28406,0,0,1-.90761-.18951l-6.5268-2.82528a2.28891,2.28891,0,0,1-1.18977-3.00587l5.04533-11.65485a5.84192,5.84192,0,1,1,10.72256,4.641l-5.04521,11.65486a2.29144,2.29144,0,0,1-2.0985,1.37965Z" transform="translate(-218.05228 -135.88181)" fill="#ccc" />
<circle cx="608.1234" cy="398.89863" r="12.47714" fill="#a0616a" />
<path d="M813.474,528.6503a45.00451,45.00451,0,0,0,19.46991,6.41531l-2.0523-2.45906a15.08155,15.08155,0,0,0,4.65879.92511,5.10215,5.10215,0,0,0,4.15874-1.94653,4.74575,4.74575,0,0,0,.31766-4.384,8.98863,8.98863,0,0,0-2.82774-3.5358,16.83505,16.83505,0,0,0-15.66916-2.80036,10.06156,10.06156,0,0,0-4.67994,3.002c-1.18283,1.45918-3.46,2.75926-2.85437,4.53733Z" transform="translate(-218.05228 -135.88181)" fill="#2f2e41" class="secondary__fill" />
<path d="M828.27364,518.58119a38.34676,38.34676,0,0,0-13.95134-9.02177,19.62911,19.62911,0,0,0-10.5691-1.3118c-3.52582.70953-6.86016,3.14865-7.84381,6.608-.80434,2.82876.0262,5.87447,1.27444,8.53731s2.91472,5.13212,3.92415,7.89434a18.01791,18.01791,0,0,1-18.13023,24.16189c3.46428.46451,6.65749,2.0925,10.04366,2.959s7.38274.80779,9.89911-1.61809c2.66242-2.56667,2.71572-6.7398,2.587-10.4357l-.57406-16.48222c-.09758-2.80187-.18092-5.69354.82952-8.30869s3.41185-4.90514,6.21531-4.88135c2.12475.018,4.00534,1.3052,5.7093,2.5746s3.50751,2.62372,5.62393,2.81253,4.53289-1.37743,4.37452-3.49635" transform="translate(-218.05228 -135.88181)" fill="#2f2e41" class="secondary__fill" />
<path d="M805.19861,597.4978a5.5903,5.5903,0,1,1,2.15493-10.75121h.00012a5.36793,5.36793,0,0,1,.66626.33759l22.72854-10.20426.63848-6.16428,9.79733-.26218-.06486,10.26255a5.52712,5.52712,0,0,1-3.99348,5.25418L810.54606,593.536a5.20848,5.20848,0,0,1-.18244.51768,5.611,5.611,0,0,1-5.165,3.44417Z" transform="translate(-218.05228 -135.88181)" fill="#a0616a" />
<path d="M840.35448,575.48422a2.28415,2.28415,0,0,1-.895.242l-7.09865.43646a2.28892,2.28892,0,0,1-2.42192-2.14128l-.77917-12.67612a5.84193,5.84193,0,1,1,11.6618-.71749l.77927,12.67606a2.29145,2.29145,0,0,1-1.24628,2.18035Z" transform="translate(-218.05228 -135.88181)" fill="#ccc" />
<rect x="783.01603" y="595.22343" width="43.68847" height="3.55604" rx="1.77802" transform="translate(1391.66826 1058.1211) rotate(180)" fill="#3f3d56" class="seat__fill" />
<path d="M767.26787,595.47744V570.58517a3.30578,3.30578,0,0,1,3.302-3.302h45.21249a3.30578,3.30578,0,0,1,3.302,3.302v24.89227a3.30577,3.30577,0,0,1-3.302,3.302H770.5699A3.30577,3.30577,0,0,1,767.26787,595.47744Z" transform="translate(-218.05228 -135.88181)" fill="#3f3d56" class="seat__fill" />
<circle cx="575.12386" cy="447.1495" r="3.04803" fill="#fff" />
<path d="M465.5,525.5h-11a4,4,0,0,1,0-8h11a4,4,0,0,1,0,8Z" transform="translate(-218.05228 -135.88181)" fill="#6c63ff" class="primary__fill" />
</svg>
<form>
<div class="controle">
<label for="primary-fill-color">Primary Color:</label>
<input type="color" value="#6c63ff" id="primary-fill-color" name="primary-fill-color" />
</div>
<div class="controle">
<label for="secondary-fill-color">Secondary Color:</label>
<input type="color" value="#2f2e41" id="secondary-fill-color" name="secondary-fill-color" />
</div>
<div class="controle">
<label for="leaf-fill-color">Leaf Color:</label>
<input type="color" value="#f2f2f2" id="leaf-fill-color" name="leaf-fill-color" />
</div>
<div class="controle">
<label for="leaf-fill-color-2">Leaf Color 2:</label>
<input type="color" value="#e6e6e6" id="leaf-fill-color-2" name="leaf-fill-color-2" />
</div>
<div class="controle">
<label for="seat-fill-color">Seat Color:</label>
<input type="color" value="#3f3d56" id="seat-fill-color" name="seat-fill-color" />
</div>
</form>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 100vw;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
font-family: "Exo", Arial, sans-serif;
}
svg {
width: 80vw;
height: 80vh;
}
:root {
--primary-fill-color: #6c63ff;
--secondary-fill-color: #2f2e41;
--leaf-fill-color: #f2f2f2;
--leaf-fill-color-2: #e6e6e6;
--seat-fill-color: #3f3d56;
}
.primary__fill {
fill: var(--primary-fill-color);
}
.secondary__fill {
fill: var(--secondary-fill-color);
}
.leaf__fill {
fill: var(--leaf-fill-color);
}
.leaf__fill--secondary {
fill: var(--leaf-fill-color-2);
}
.seat__fill {
fill: var(--seat-fill-color);
}
form {
position: fixed;
top: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.8);
color: #fff;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
padding: 10px;
}
.controle:not(:last-child) {
margin-bottom: 20px;
}
.controle {
display: grid;
grid-template-columns: 150px 1fr;
gap: 10px;
align-items: center;
text-shadow: 2px 2px 0 rgb(9 94 133 / 74%);
}
label {
display: block;
text-align: right;
}
input[type="color"] {
display: block;
width: 48px;
height: 48px;
border-radius: 8px;
border: none 0;
}
input[type="color" i]::-webkit-color-swatch-wrapper {
padding: 0;
border-radius: 8px;
}
input[type="color" i]::-webkit-color-swatch {
border: none 0;
border-radius: 8px;
}
const svgEle = document.querySelector("svg");
const inputColors = document.querySelectorAll('input[type="color"]');
inputColors.forEach((element) =>
element.addEventListener("input", (evt) => {
svgEle.style.setProperty(`--${evt.target.id}`, `${evt.target.value}`);
console.log(evt.target.value);
})
);
Also see: Tab Triggers