gpt-4o-mini-2024-07-18· OpenAI
WildChat-4.8M (AI2)
--- File: /Users/daryl/Downloads/Recents/christmas-tree1.html <!DOCTYPE html>…
- User
User: --- File: /Users/daryl/Downloads/Recents/christmas-tree1.html
@layer normalize, base, demo, debug; @layer debug { [data-lights='false'] { .tree > div::before { opacity: 0; } } [data-unmask='true'] { .tree > div { -webkit-mask: none; mask: none; -webkit-clip-path: none; clip-path: none; outline: 1px dashed hsl(0 0% 100%); outline-offset: 1px; &::after { outline: 1px dashed yellow; outline-offset: 2px; } &::before { outline: 1px dashed green; outline-offset: 4px; } } } } @layer demo { .star { width: 5ch; left: 50%; position: absolute; bottom: 100%; z-index: 2; transform-style: preserve-3d; transform: translate3d(-50%, 40%, 130px) rotateX(30deg) rotateY(-30deg); filter: drop-shadow(0 0 6px yellow); path { stroke: white; stroke-dasharray: 100; stroke-dashoffset: 100; -webkit-animation: draw 1s 4s both; animation: draw 1s 4s both; transform-box: fill-box; transform-origin: 50% 50%; opacity: 0.1; &:nth-of-type(1) { -webkit-clip-path: inset(0 50% 0 0); clip-path: inset(0 50% 0 0); } &:nth-of-type(2) { -webkit-clip-path: inset(0 50% 0 0); clip-path: inset(0 50% 0 0); /* opacity: 0; */ scale: -1 1; } } } .scene { --character-width: 1; /* In "ch" units */ --inner-angle: calc((360 / var(--sides)) * 1deg); --radius: calc((var(--character-width, 1) / sin(var(--inner-angle))) * 1ch); transform-style: preserve-3d; position: relative; } .split { background: hsl(0 0% 0% / 0.5); position: absolute; top: 50%; left: 50%; width: calc(var(--radius) * 5); height: calc(var(--height) * 1.2ch); translate: -50% -50%; transform: rotateX(-30deg); } .tree { transform-style: preserve-3d; width: 1ch; aspect-ratio: 1 / var(--height); position: relative; transform: rotateX(-30deg) rotateY(24deg); -webkit-animation: rotate 20s infinite linear; animation: rotate 20s infinite linear; & > div { transform-style: preserve-3d; height: 100%; width: 100%; position: absolute; -webkit-mask: radial-gradient(red 60%, #0000 0) 0 0 / 1ch 1ch; mask: radial-gradient(red 60%, #0000 0) 0 0 / 1ch 1ch; transform: rotateY(calc(var(--inner-angle) * var(--side))) translate3d(0, 0, calc(var(--radius) * -1)) rotateX(calc(var(--rotate, 12) * -1deg)); transform-origin: 50% calc(var(--to, 12) * 1ch); -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); -webkit-animation: unclip 2s 1s both steps(var(--height)); animation: unclip 2s 1s both steps(var(--height)); &::after { --speed: 4; --sides: 20; content: ''; position: absolute; width: 100%; opacity: 0.65; height: 200%; -webkit-animation: travel 5s infinite; animation: travel 5s infinite; -webkit-animation-timing-function: linear; animation-timing-function: linear; -webkit-animation-delay: calc( (sin(calc(var(--side) * (var(--inner-angle) * 0.2))) + 1) * -1s ); animation-delay: calc( (sin(calc(var(--side) * (var(--inner-angle) * 0.2))) + 1) * -1s ); background: linear-gradient( oklch(88.24% 0.2757 var(--hue, 0)) 0 1ch, oklch(63.24% 0.2757 var(--hue, 0)) 2ch, transparent calc(var(--size) * 1%) ) 0 0 / 1ch calc(100% / var(--segments)); } &::before { --light-img: radial-gradient(white 25%, #0000 0); content: ''; position: absolute; width: 100%; height: 400%; z-index: 2; background-image: var(--light-img), var(--light-img), var(--light-img), var(--light-img), var(--light-img), var(--light-img), var(--light-img), var(--light-img), var(--light-img), var(--light-img); background-size: 1ch 1ch; background-repeat: no-repeat; background-position: 0 var(--light-0), 0 var(--light-1), 0 var(--light-2), 0 var(--light-3), 0 var(--light-4), 0 var(--light-5), 0 var(--light-6), 0 var(--light-7), 0 var(--light-8), 0 var(--light-9); -webkit-animation: blink 0.5s calc(var(--delay) * -1s) infinite steps(4); animation: blink 0.5s calc(var(--delay) * -1s) infinite steps(4); } } } @-webkit-keyframes blink { 100% { translate: 0 -100%; } } @keyframes blink { 100% { translate: 0 -100%; } } @-webkit-keyframes draw { to { stroke-dashoffset: 0; opacity: 1; } } @keyframes draw { to { stroke-dashoffset: 0; opacity: 1; } } @-webkit-keyframes travel { 100% { translate: 0 -50%; } } @keyframes travel { 100% { translate: 0 -50%; } } @-webkit-keyframes unclip { 0% { -webkit-clip-path: inset(0 0 100% 0); clip-path: inset(0 0 100% 0); } } @keyframes unclip { 0% { -webkit-clip-path: inset(0 0 100% 0); clip-path: inset(0 0 100% 0); } } @-webkit-keyframes rotate { to { transform: rotateX(-30deg) rotateY(24deg) rotateY(-360deg); } } @keyframes rotate { to { transform: rotateX(-30deg) rotateY(24deg) rotateY(-360deg); } } } @layer base { :root { --font-size-min: 16; --font-size-max: 20; --font-ratio-min: 1.2; --font-ratio-max: 1.33; --font-width-min: 375; --font-width-max: 1500; } html { color-scheme: dark only; } :where(.fluid) { --fluid-min: calc( var(--font-size-min) * pow(var(--font-ratio-min), var(--font-level, 0)) ); --fluid-max: calc( var(--font-size-max) * pow(var(--font-ratio-max), var(--font-level, 0)) ); --fluid-preferred: calc( (var(--fluid-max) - var(--fluid-min)) / (var(--font-width-max) - var(--font-width-min)) ); --fluid-type: clamp( (var(--fluid-min) / 16) * 1rem, ((var(--fluid-min) / 16) * 1rem) - (((var(--fluid-preferred) * var(--font-width-min)) / 16) * 1rem) + (var(--fluid-preferred) * var(--variable-unit, 100vi)), (var(--fluid-max) / 16) * 1rem ); font-size: var(--fluid-type); } *, *:after, *:before { box-sizing: border-box; } body { display: grid; place-items: center; background: #000; min-height: 100vh; font-family: 'SF Pro Text', 'SF Pro Icons', 'AOS Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif, system-ui; } body::before { --size: 45px; --line: color-mix(in hsl, canvasText, transparent 70%); content: ''; height: 100vh; width: 100vw; position: fixed; background: linear-gradient( 90deg, var(--line) 1px, transparent 1px var(--size) ) 50% 50% / var(--size) var(--size), linear-gradient(var(--line) 1px, transparent 1px var(--size)) 50% 50% / var(--size) var(--size); -webkit-mask: linear-gradient(-30deg, transparent 70%, white); mask: linear-gradient(-30deg, transparent 70%, white); top: 0; transform-style: flat; pointer-events: none; z-index: -1; } .bear-link { color: canvasText; position: fixed; top: 1rem; left: 1rem; width: 48px; aspect-ratio: 1; display: grid; place-items: center; opacity: 0.8; } :where(.x-link, .bear-link):is(:hover, :focus-visible) { opacity: 1; } .bear-link svg { width: 75%; } /* Utilities */ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } } - Assistant
Sure! Here’s a text prompt that you can use to generate the same HTML code as in the attached file:
Text Prompt:
Create an HTML file for a dynamic Christmas tree simulation for 2024. The HTML should include:
- A
DOCTYPEdeclaration and necessary<html>,<head>, and<body>elements. - The
<head>should include:- A meta tag for UTF-8 character encoding.
- A title "Christmas Tree '24".
- A style section with CSS rules organized into layers:
- A