1. 28
  1. 7

    Ah, brings me back to the days of MySpace, <marquee/>, <blink/>, and tiny pixel art gifs…

    1. 7

      It’s appropriate for winter: my CPU spins and my laptop is warm and cozy. :D (but seriously, impressive! I’m not a web person, but I had no idea you could do so much with bare CSS)

      1. 4

        It’s a really hacky effect too.

        See https://christine.website/css/snow.css. In there I create a class called snow with both of the background images (random dots i colored white based off of ideas from a stackoverflow answer). It creates a 30 second infinite loop of linear animation. Then for the keyframes I have the snow move down and to the right.

        1. 1

          Any idea why it’s so CPU intensive? It’s been a while, but I vaguely recall CSS animation generally outperforming JS animation.

          1. 3

            I think it’s because of the blur and animation frames colliding in weird ways. I think I’m gonna roll back the frosted glass effect, but it was cool that it was so easy to implement (ignore the unrelated commit i accidentally merged into it)

          2. 1

            Could this have also been done using SVG or blur?

            1. 2

              It does use blur!

                  backdrop-filter: blur(3px);
                  padding: 1em;
              1. 1

                Err, I meant using Blur on something like a border or a background, as to avoid the background-image blob.

              2. 1

                In my opinion, using SVG is a cheat. It has the same capabilities of <canvas> basically.

                IMO @cadey cheated here too because they used an image. So now the browser must understand image data. Better is if they 1. render a circle (via border-radius) 2. animate the circle 3. generate the markup to create many circles or similar.

                SCSS would probably be good for this, since they can pre-generate random positions.

          3. 5

            This article was posted on 2018 M12 17.

            And I thought I’d come across most date formats by now… :/

            (but the snow is nice :)

            1. 7

              I’m doing my part in adding date formats to people’s test suites, one confusion at a time.

              1. 3

                That’s cold.

            2. 3
              animation: snow 30s linear infinite;

              Wait wait … snow is a CSS3 animation effect?!

              1. 4

                that’s referring to the @keyframes snow at the bottom of the css file, which gives background position items and then the css engine interpolates other frames in between.

                all it really does is move a background image.

              2. 2

                Considering adding this to my own site. It’s currently simple black text on a white background, so the snow doesn’t show up, but the following worked really nicely…

                1. Set body { background-color: #111; }
                2. Set body { filter: invert(100%) } to invert all the text colors
                3. Set body { font-weight: bold; } since my choice of font looks pretty bad on a black background, and bolding helps a lot.

                And then someone gave me the idea to make it dynamic based on if it’s actually snowing in my area so I might do…

                1. Keep two CSS files on the server somewhere, style_nosnow.css and style_snow.css.
                2. Set up a script to run on my server that runs every x minutes/hours/whatever to poll a weather API (could use DarkSky since their API is free for less than 1000 requests/day).
                3. Based on the polled weather condition and if it’s snowing, copy the relevant CSS file to /style.css in my webroot so the site is “dynamically” updated, without having to poll the API from the site itself, and avoiding any javascript to the site as well.

                This nicely avoids:

                1. Client-side weather API requests because putting an API key right in my page would be a bad idea.
                2. If a ton of people visit my site, I could run over the 1000 requests limit if I’m polling with each site load server-side somehow.
                3. Having to use any client-side javascript at all.
                4. Having to use some kind of dynamic webserver, can continue just serving up static files.
                1. 2

                  I was actually considering doing this too with other weather too like rain, thunder, lightning and clouds.

                2. 2

                  That “Share on Mastodon” button makes my heart smile

                  1. 1

                    This is fun, I love this stuff. Would see this kind of thing back when web design was more whimsical.

                    1. 1

                      Oh, that’s lovely. I really like the look and feel of your website! Could you describe a little what you used to put it together?

                      1. 4

                        It’s based on a few things:

                        It is a very boring Go app.

                        1. 1