Masthash

#codepen

๐Ÿ’ก CSS Tip!

Use the new color-mix() function to generate random colors from your favorite one
โœ… A new color on each page load
โœ… No contrast issue
โœ… Easily control the color range

Demo: https://codepen.io/t_afif/full/eYEQbmg via :codepen: #CodePen

#CSS

Overview of the CSS code from a demo that doesn't really exist because, you know, it's the 1st of April
A random text
A random text

๐Ÿ’ก CSS Tip!

Use the new color-mix() to manipulate the Hue of a color in the HSL color space (until better support for relative color syntax)

Demo: https://codepen.io/t_afif/pen/VwGNQEv via :codepen: #CodePen

#CSS

Overview of the CSS from the linked demo
CodePen.IO :verify:
3 days ago

RTโ€‚Juxtopposed
just made this design for the @CodePen play button challenge. been wanting to make this animation for a while now.
check it out on CodePen for a little surprise (it's not rickroll, I promise): https://codepen.io/Juxtopposed/pen/vYzPrbg
#CodePen #CodePenChallenge https://t.co/oPvF6KFlVJ

:sys_twitter: https://twitter.com/juxtopposed/status/1640816049062035457

Media source: https://video.twimg.com/ext_tw_video/1640814448657956867/pu/vid/1110x720/tKB5m374u0z4NaQE.mp4?tag=12
Dan Wilson
4 days ago

โœจ New post!
Creating Advanced CSS Shapes with CSS Trigonometric functions

https://danielcwilson.com/posts/css-shapes-with-trig-functions/

Plenty of #CodePen demos, as well

(Feels good to be back to writing, by the way)

๐Ÿ’ก CSS Tip!

Use the new color-mix() to create different shades from one color.

Mix with โšซ๏ธ black for a darker color and โšช๏ธ white for a lighter color

Demo: https://codepen.io/t_afif/pen/ExeMOPV via :codepen: #CodePen

#CSS

Overview of the CSS code from the demo in the tweet
3 shades of green color
3 shades of red color

๐Ÿ’ก CSS Tip!

Use the new color-mix() function to create a color switch.
โœ… No color duplication
โœ… Define your colors once using one variable
โœ… Easy switch between colors
โœ… Suitable for dark/light mode

Demo: https://codepen.io/t_afif/pen/XWPGWPp via :codepen: #CodePen

#CSS

An overview of the CSS from the linked demo
Florian Geierstanger
1 week ago

`pen.new` I use @codepen daily and like it a lot. Yet there are two things that I miss: customisable keyboard shortcuts (I have a German keyboard) and faster performance. Compared with Vite locally, #Codepen feels just too slow.

`csb.new` Looking for alternatives, I found #CodeSandbox promising. They have two modes, cloud and browser - and browser mode has the responsiveness I was looking for.

Let's see if I get used to it or come back to Codepen for the many details they sure got right.

Ana Tudor ๐Ÿฏ
1 week ago

Me on #CodePen.

Screenshot of my CodePen profile, showing 10999 followers.
CodePen.IO :verify:
1 week ago

RTโ€‚simey
the @CodePen #codepen #challenge is about Expanding Buttons ... Well here's the Expanding Brain meme (Galaxy Brain) in button format.
The code is a mess, don't look.
https://codepen.io/simeydotme/pen/jOveeBg
#webdev #css #js #frontend #FrontEndDeveloper

:sys_twitter: https://twitter.com/simeydotme/status/1638858415895109634

An expanding gallery for this week #CodePenChallenge

๐ŸŒŸ A CSS-only version with minimal code

Demo: https://codepen.io/t_afif/full/JjaebpJ via :codepen: #CodePen

#CSS

An overview of the linked demo
CodePen.IO :verify:
2 weeks ago

RTโ€‚comicss
An animated version of today's cartoon! It is also coded in HTML and CSS, with some CSS animations.
Live demo and source code: https://codepen.io/alvaromontoro/pen/GRXGPBP
Cartoon on comiCSS (static image): https://comicss.art/?id=80
#css #html #video #codepen #animation #comic #webcomic #comicss https://t.co/AbXnCvFE9A

:sys_twitter: https://twitter.com/comi_CSS/status/1637632297083043840

Media source: https://video.twimg.com/ext_tw_video/1637632129700855809/pu/vid/958x720/YzgxJdKKDE5egbnD.mp4?tag=12
Fractal Kitty
2 weeks ago

my cultured ink is featured in this week's codepen spark!

https://codepen.io/spark/330

#codepen #creativecoding #wccchallenge #mathart

Dan Wilson
2 weeks ago

New demo... walking through how to do cutouts inside an element with CSS Shapes (via clip paths) + CSS Trig functions:

#codepen: https://codepen.io/danwilson/full/oNPoXEo

Screenshot of demo that allows to view a final clip path as it is built by adding subsequent vertices to a polygon, resulting ultimately into a face with eyes and smile cut out such that the background is visible beneath.
Alvaro Montoro
2 weeks ago

This is an animated version of today's cartoon! It is also coded in HTML and CSS, with some CSS animations.

Live demo and source code: https://codepen.io/alvaromontoro/pen/GRXGPBP

Cartoon on comiCSS site (static image): https://comicss.art/?id=80

#css #html #video #codepen #animation #demo #comic #webcomic #comicss

Animated cartoon: Death (a cloaked skeleton with a scythe) receives a text message from JavaScript saying 'CSS is dead!' Disappointed, Death sighs: That guy is so annoying... Maybe it's time I take anohter of its frameworks away...

๐ŸŽจ CSS Pattern!

Demo: https://codepen.io/t_afif/full/qBMygYM via :codepen: #CodePen

More CSS-only patterns ๐Ÿ‘‰ https://css-pattern.com

#CSS

A pattern made with rectangular shapes
Dan Wilson
2 weeks ago

Viewed several pieces by Carlos Cruz-Diez recently at the Museum of Fine Arts Houston. Lots of lenticular effects and visual fun.

Which means I had to take a pass recreating the approach with CSS and 3D transforms on #codepen

https://codepen.io/danwilson/full/ZEMjXEB

Screenshot of a HTML and CSS rendition of an artwork by Carlos Cruz-Diez viewed mostly straight on. If you view from different angles the work will appear differently due to its specific construction.

๐Ÿ’ก CSS Tip!

Add rotating circles around your image with a nice hover effect
โœ… Only one element (the <img> tag)
โœ… No pseudo-element
โœ… Optimized with CSS variables
โœ… Powered by trigonometric functions and @โ€‹property ๐Ÿคฉ

Demo: https://codepen.io/t_afif/full/oNPyPQd via :codepen: #CodePen

#CSS

Overview of hover effect from the linked demo

Another experiment with radio buttons for #CodePenChallenge

๐ŸŒŸ CSS-only using trig functions and :has() selector

Demo: https://codepen.io/t_afif/full/bGxMeJJ via :codepen: #CodePen

Use the keyboard and hold the key down for some magic levitation ๐Ÿคฉ

You can add as many input as you want!

#CSS

Overview of the linked demo
Alvaro Montoro
2 weeks ago

A CSS drawing of a Motorola RAZR V3 (the best flip phone ever created ๐Ÿ˜‰)

Coded in HTML and CSS, it is responsive and slightly animated (the screen will go to sleep after 10 seconds and wake up after pressing any button.)

Demo on #codepen: https://codepen.io/alvaromontoro/pen/JjaMMXw

#CSSArt #css #html #drawing #motorola #RAZR

Drawing of a Motorola RAZR V3 flip phone done in HTML and CSS.

A jumping radio button? Why not!

A fun little experience for this week #CodePenChallenge

๐ŸŒŸCSS-only powered by the :has() selector and some magic cubic-bezier()

Demo: https://codepen.io/t_afif/full/abaYxQj via :codepen: #codepen

#CSS

Overview of the linked demo

Reveal the caption of an image with a fancy hover effect. Powered by CSS Mask.

Demo: https://codepen.io/t_afif/full/BaOYqKZ via :codepen: #codepen

#CSS

Overview of the hover effect from the linked demo
Ana Tudor ๐Ÿฏ
3 weeks ago

And the most random assortment of buttons to summon Satan https://codepen.io/thebabydino/pen/eYYyqZR

Fun fact: first made this for a conference talk. Upon arriving there, discovered the venue was a church. One of the paintings there crashed with a loud noise during my talk.
https://twitter.com/anatudor/status/1197923211347931138

Requires support for registering custom properties via @ property.

#CSS #JS #CodePen #webDev #button #buttons #control #controls #coding #webDevelopment #mask #svg #satan

Animated gif. Clicking the Summon Satan button brings up a Lucipurr character and a control panel with a melting pot of styles for the controls there. These controls can make Lucipurr's horns and forehead pentagram start glowing, can make his whiskers start moving, can make his fangs and claws come out, can adjust the length of his pitchfork or his eye colour.
Ana Tudor ๐Ÿฏ
3 weeks ago

Plus:

โœจ an old download button https://codepen.io/thebabydino/pen/xZxyPb

โœจ an animated version https://codepen.io/thebabydino/pen/VwzpMxV (Chromium only) of the candy ghost buttons I wrote about a few years back on CSS-Tricks: https://css-tricks.com/css-ing-candy-ghost-buttons/

#CSS #JS #CodePen #webDev #button #buttons #control #controls #coding #webDevelopment #mask #pastel

Animated gif. Shows a mesh-textured download button whose border, once clicked, starts filling up with a neon blue from left (0%) to right (100%, download complete).
Screenshot. Shows the 50% done state of the download button.
Animated gif. Shows the pastel ghost buttons filling up from the bottom to the top on hover and this fill XOR-ing the button text and icon.
Screenshot. Shows various fill levels for the candy ghost buttons.
Ana Tudor ๐Ÿฏ
3 weeks ago

Some XOR effect close buttons for some random quotes https://codepen.io/thebabydino/pen/VwmQQwJ

The basic idea behind is something I recorded myself coding from scratch https://codepen.io/thebabydino/pen/bGBLXEy

The concept behind the XOR is something I explaine in this @css article https://css-tricks.com/taming-blend-modes-difference-and-exclusion/

#CSS #JS #blending #CodePen #webDev #button #buttons #control #controls #coding #webDevelopment

Animated gif. Tiles getting rearranged after a tile before them is closed. The close button has a XOR effect on hover and the tile closing effect is the same.
Ana Tudor ๐Ÿฏ
3 weeks ago

Would have loved to do something for this week's #CodePenChallenge, but the past weeks have had too many tech (both hardware & software) and non-tech problems eating out of my time, so all I have is a bunch of older button demos I made on #CodePen:

Soft #buttons https://codepen.io/thebabydino/pen/dLLxdj

#CSS #webDev #button #control #coding #webDevelopment

Soft buttons screenshot.

๐ŸŽจ CSS Pattern!

Demo: https://codepen.io/t_afif/full/qBMpyqV via :codepen: #codepen

More CSS-only patterns ๐Ÿ‘‰ https://github.com/Afif13/CSS-Pattern

#CSS

A pattern made with a 3D zig-zag shape
Rolf van Root
3 weeks ago

A nice use-case of #ChatGPT for me as a #marketer is the option to generate HTML.

And then, copy/paste the HTML into an online HTML editor (like #codepen) to get a preview of it.

This gives a better feel of what the copy could look like on a web page.

And iterating on the copy with ChatGPT is also fun.

#copywriting #marketing #wireframe #webdevelopment #productivity

๐Ÿ’ก CSS Tip!

Add a fancy hover effect to your image
โœ… One element (no pseudo-element)
โœ… Optimized with CSS variables
โœ… Powered by trigonometric functions and @โ€‹property ๐Ÿคฉ

Demos via :codepen: #codepen

Version 1: https://codepen.io/t_afif/full/NWLXqPz
Version 2: https://codepen.io/t_afif/full/oNPpjLd

#CSS

Overview of the hover effect from the linked demo
Overview of the hover effect from the linked demo
Ana Tudor ๐Ÿฏ
3 weeks ago

But now, we can compute the scaling factor as the cosine of the skew angle, animate the skew angle* and the scaling factor changes accordingly ๐Ÿฅณ๐ŸŽ‰

*@โ€‹property support needed

#css #trigonometry #CodePen #coding #maths #geometry #webDev #webDevelopment #transform #CSStransforms #tiling

@property --sxa { /* skew angle */
	syntax: '<angle>';
	initial-value: -90deg;
	inherits: true
}

.square {
	--sxa: -90deg;
	--syf: cos(var(--sxa)); /* scale factor */
	transform: skewX(var(--sxa)) scaley(var(--syf));
	animation: sxa 2s ease-in-out infinite
}

@keyframes sxa { to { --sxa: 90deg } }
Ana Tudor ๐Ÿฏ
3 weeks ago

So we must scale down edges along the y axis post-skew in order to get a rhombus again!

This scaling factor is the cosine of the skew angle, which doesn't change linearly with a linear change in the angle from -90ยฐ to 90ยฐ. We can approximate the change with cubic-bezier, but we can't use individual transform properties as those would place the skew after the scale.

So when I first coded this 5 years ago, I chose to use #JS.

#css #transform #maths #trigonometry #CodePen #webDev #coding

--syf: cos(var(--sxa));
transform: 
  skewX(var(--sxa)) scaleY(var(--syf))
--syf: cos(var(--sxa));
transform: skewX(var(--sxa));
scale: 1 var(--syf);
/* scale applied before skew here ๐Ÿ‘Ž */
/* transform order matters!!! */
Ana Tudor ๐Ÿฏ
3 weeks ago

There's also this square tiling https://codepen.io/thebabydino/pen/JjBEzMQ

This is a pure #CSS version of something I coded with #JS a few years back https://codepen.io/thebabydino/pen/JNZGwE/

If you look at the orange squares, they get squished to rhombi & eventually to a line (then they go back).

This is done with skew along the x axis. But the way this works https://codepen.io/thebabydino/full/JoQRdb means edges along the other axis (y) get longer & we don't have a rhombus (all 4 edges equal) anymore!

#CodePen #trigonometry #webDev #maths

Square tiling animation.
Screenshot of linked demo, showing edges of a former square getting longer along its y axis post x axis skew.
Yahia Lababidi
3 weeks ago

Happy to be standing with the #artist , Brian DuPont, in front of one of his pieces inspired by a #poem of mine, "Ars Poetica"

The lines in his #art represent the stanzas, and some of my words are there he assures me. He wants viewers to "work... like #codepen breakers"

#ArtMatters #CreativeToots #creativecoding #coding #painting #poetry #poetrycommunity #writing #WritingCommunity #Gallery #JoinIn

Ana Tudor ๐Ÿฏ
3 weeks ago

Also made this torus knot https://codepen.io/thebabydino/pen/vYdMVJK??editors=0100

CSS trig functions allow to avoid hardcoding the position vector into a custom prop for each & every item making up the knot as I had to before when coding such shapes:

โœจ https://codepen.io/thebabydino/pen/GMmzjP?editors=0100

โœจ https://codepen.io/thebabydino/pen/wEqVwz?editors=1000

โœจ https://codepen.io/thebabydino/pen/eGBZeQ?editors=0100

#css #webDev #coding #maths #geometry #3D #CodePen #torusKnot #trigonometry

Animated gif. Shows a (2, 5) torus know made of tiny spheres rotating around its y axis, first by half a turn, then by another half a turn to complete a full.
Ana Tudor ๐Ÿฏ
3 weeks ago

GRUB is giving me a massive headache today๐Ÿ˜ต๐Ÿ˜ตโ€๐Ÿ’ซ, so here are a few things I made on #CodePen
that should now work in Chromium 111+ as a result of support for trigonometric functions dropping.

First up: Animated Mรถbius strip using CSS mathematical functions https://codepen.io/thebabydino/pen/wvybyMo

#css #webDev #coding #maths #geometry #3D #trigonometry #moebius

Animated gif. Shows a Mรถbius strip made up of loosely-spaced rectangular segments each rotating by half a turn around the strip axis, then by another half a turn to get into the initial position. The animation is staggered so that when the last strip finishes one iteration the first strip begins the next iteration.

๐Ÿ’ก CSS Tip!

Create a colorful loader using a few lines of code
โœ… One element
โœ… 10 CSS declarations
โœ… One value to control the size

Demo: https://codepen.io/t_afif/full/MWqOpYG via :codepen: #codepen

#CSS

A colorful loader made using CSS

๐Ÿ’ก CSS Tip!

Use online generators to create CSS shapes using clip-path in not time!

Polygon Shapes ๐Ÿ‘‰ https://css-generators.com/polygon-shape
Starburst Shapes ๐Ÿ‘‰ https://css-generators.com/starburst-shape

โœ… One Click to copy the code

Demo: https://codepen.io/t_afif/full/KKxXRWB via :codepen: #codepen

#CSS

6 shapes built using clip-path. 3 starburst shapes and 3 polygon shapes

๐ŸŽจ CSS Art!

The last episode of #AttackOnTitan was a masterclass! Here is a CSS Art to celebrate it

A CSS-only version of The Rumbling! Coming for you! โ˜ ๏ธโ˜ ๏ธ โ˜ ๏ธ

Demo: https://codepen.io/t_afif/full/BaOLqom via :codepen: #codepen

More CSS-only Arts ๐Ÿ‘‰ https://css-only.art

#CSS #ShingekiNoKyojin #AttackonTitanFinalSeason

The Rumbling from SNK made using only CSS. Yes it's not that perfect but it's CSS so it's not that bad too.
Ana Tudor ๐Ÿฏ
1 month ago

For the latest #CodePenChallenge: grainy dissolving an image's edges https://codepen.io/thebabydino/pen/oNMBeye?editors=1100

Done with #CSS + an #SVG filter, heavily commented.

For comparison, the original image in the img tag which you can see on right click, open image in new tab.

#CodePen #webDev #webDevelopment #coding #SVGFilter

image with grainy dissolving edges
original rectangular image, no edge graininess
Ana Tudor ๐Ÿฏ
1 month ago

Something for this week's #CodePenChallenge: 1 div grainy/ dithered gradient blob with a simple SVG filter https://codepen.io/thebabydino/pen/GRBrWeY

I've given this concept a try before https://twitter.com/anatudor/status/1407388305948397571 but lately, I've been toying with SVG filters a bit more and... I got better at it...๐Ÿคทโ€โ™€๏ธ

#CSS #SVG #CodePen #SVGFilter #dither #grainy #gradient #blob #webDev #webDevelopment #compositing #maths

A mesh gradient blob with dithered fading edges.