Elektrine
Log in Register
Paige Chat Timeline Gallery Friends Email Drive DNS Private DNS Domains VPN Kairo Nerve
Remote

CSS by T. Afif :verified:

@css@front-end.social
mastodon 4.7.3
  • Open on front-end.social

CSS stuff by Temani Afif

💡 https://css-tip.com
🧩 https://css-shape.com
💫 https://css-loaders.com
📝 https://css-articles.com
⚙️ https://css-generators.com
🎨 https://css-pattern.com
✨ https://css-only.art
🎮 https://css-games.com
❓ https://css-quizzes.com

I verified myself because I know I am a real person. You can trust me, I know who I am.

0 Followers
0 Following
38 Posts
Joined November 05, 2022
Support Me:
https://support.temani-afif.com/
Github:
https://github.com/Afif13/
Codepen:
https://codepen.io/t_afif
🦋:
https://bsky.app/profile/css-only.dev
Open post
CSS by T. Afif :verified: @css@front-end.social
· 2w ago

a11y question: Let's suppose I have an empty html element somewhere on the page with 0 content, invisible*, having position:absolute (or fixed). It has no purpose in the HTML (only used for some CSS stuff).

Is it a good idea to add the "inert" attribute? Or should I do nothing?

  • It may or may not have a size, but no style to make it visible.

#A11y #HTML

2
3
2
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 3mo ago
They just released :chrome: Google Chrome V150, and it comes with border-area (among many other cool things). What's border-area? The magic value to create gradient borders easily. https://css-tip.com/border-gradient/ Two lines of code and you are done! 🤩 #CSS #HTML
Border gradient with border-radius
css-tip.com

Border gradient with border-radius

The modern way to add a gradient to borders while having rounder corners

21
1
4
1
Open post
CSS by T. Afif :verified: @css@front-end.social
· 2mo ago
💡 CSS Tip! After corner-shape, shape(), and border-shape, another feature is available to play with: rounding polygons. https://css-tip.com/rounded-shapes/ You create a polygon, add a radius value at the beginning, and you have a shape with rounded corners! #CSS #HTML
A New Way to Round the Corners of CSS Shapes
css-tip.com

A New Way to Round the Corners of CSS Shapes

Learn how to round the corners of any shape with a simple code

7
0
6
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 7mo ago

It seems we can now customize the select element, right? right?!

Demo: https://codepen.io/t_afif/pen/PwGPJOB via :codepen: @codepen@fosstodon.org

#CSS #HTML

Select your Fruit!
codepen.io

Select your Fruit!

They said we can customize select elements so let's have some fun...

29
1
16
1
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago

Bending a straight line using pure CSS?! 👀

Another cool demo in progress powered by border-shape. It's coming to :chrome: Chrome next week! 🤩

#CSS #HTML

20
2
9
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 3mo ago
💡CSS Tip! Create a responsive grid with a cool animation. Everything adjusts smoothly on resize or when adding/removing new items. https://css-tip.com/animated-grid/ A CSS-only implementation with a few lines of code. #CSS #HTML
Responsive CSS Grid Layout with Animation
css-tip.com

Responsive CSS Grid Layout with Animation

A responsive grid with a smooth animation when the layout is updated

5
0
1
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago

📝 New CSS Article!

If you have seen my graph theory demo and wondered how it works, then the article is finally live!

https://frontendmasters.com/blog/two-circles-one-arrow-and-anchor-positioning/

I was playing with two circles and anchor positioning, and ended up creating a shortest path algorithm.

Modern CSS is fun!

#CSS #HTML

frontendmasters.com

Two Circles, One Arrow, and Anchor Positioning

Drawing an line with arrows pointing to the center of two arbitrary elements measuring and displaying the distance between them doesn't seem like it would be possible in CSS alone... but...

17
0
8
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago
Replying to
Straight line as a divider: Boring! 🥱 Random wavy line as a divider: Yes, please! 🤩 https://css-generators.com/wavy-divider/ Another CSS generator ready for border-shape! #CSS #HTML
CSS Generator for Wavy Dividers
css-generators.com

CSS Generator for Wavy Dividers

Add a nice wavy shape to the top or the bottom of your element. Get an optimized & modern code using the shape() function.

14
1
7
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago

What's the best way to showcase modern CSS features? By making games!

This time it's the famous :chrome: Dino Game 🦖

https://css-tip.com/dino-game/

100% CSS magic playable with the keyboard. Yes, you can jump and crouch with the arrow keys! 👀

Don't search for the JS, there is none.

#CSS #HTML

CSS-only Chrome Dino Game
css-tip.com

CSS-only Chrome Dino Game

Recreating the famous Dino game by Google using pure CSS, and playable with the keyboard

13
1
4
1
Open post
CSS by T. Afif :verified: @css@front-end.social
· 3mo ago
Replying to
To avoid any confusion, let's add a tooltip showing the current value. An ugly one that bounces in all directions! https://css-tip.com/wiggly-range-slider-2/ Now, the range slider is perfect, no one can say otherwise! #CSS #HTML
Wiggly/Wavy Input Range Slider II
css-tip.com

Wiggly/Wavy Input Range Slider II

Adding a bouncy tooltip to the wiggly slider

4
0
1
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 5mo ago
Replying to
Another demo with an infinite marquee animation https://codepen.io/t_afif/full/QwGjxPv via :codepen: @codepen@fosstodon.org Hover to accelerate, slow down, or change the direction. #HTML #CSS
Infinite Marquee Speed Control (hover to see the result)
codepen.io

Infinite Marquee Speed Control (hover to see the result)

https://css-tip.com/speed-control/...

8
2
3
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 3mo ago
📝 New CSS Article! I wrote about border-shape. A super powerful feature! You might think I'm exaggerating but I am not. https://css-tricks.com/get-ready-for-the-powerful-css-border-shape-property/ This is just a tiny overview of its potential. Stay tuned for more articles/demos that will blow your mind (I am still not exaggerating!) #CSS #HTML
Get Ready For the Powerful CSS border-shape Property! | CSS-Tricks
CSS-Tricks

Get Ready For the Powerful CSS border-shape Property! | CSS-Tricks

We recently got the shape() function and corner-shape property. What else could we possibly need as far as making shapes in CSS? Let me tell you: the border-shape property!

3
0
1
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 7mo ago

A classic rounded button: boooring!! 🥱
A squishy animated button: Yes, please!! 🤩

https://css-tip.com/squishy-button/

Another cool demo powered by the powerful shape() function

#CSS #HTML

A Squishy Button with a Hover/Click Effect
css-tip.com

A Squishy Button with a Hover/Click Effect

Using the shape() function to add a fancy shape to a button element

11
0
3
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago

I thought I had found a bug that prevented counter() from working properly, but it was a feature!

https://css-tip.com/counter-gotcha/

Another CSS gotcha that you'd better know about if you don't want to waste time trying to figure out why your code isn't working.

Thanks to @mia@front-end.social for the insights

#CSS #HTML

The Gotcha of using counter() with container
css-tip.com

The Gotcha of using counter() with container

counter() may behave strangely when combined with container. Learn about this small quirk

9
0
4
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 7mo ago

Now that shape() is available in all major browsers, let me remind you that you can use my online generator to create any polygon with ... rounded corners!

https://css-generators.com/polygon-shape/

Adjust the setting, then copy the code.

#CSS #HTML

CSS Generator for Polygon shapes (Triangle, Rhombus, Hexagon, and more)
css-generators.com

CSS Generator for Polygon shapes (Triangle, Rhombus, Hexagon, and more)

Create any kind of Polygon shape using CSS clip-path. Get an optimized & modern code in no time.

8
0
3
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago

Stack Overflow asked me to propose a CSS Challenge, and I couldn't refuse.

https://stackoverflow.com/beta/challenges/79908564/challenge-17-the-accurate-selection

It's about Selectors and more! There is nothing to win (except a profile badge), but it's a fun challenge to illustrate your creativity.

#CSS #HTML

Challenge #17: The Accurate Selection [COMPLETED]
Stack Overflow

Challenge #17: The Accurate Selection [COMPLETED]

Stack Overflow | The World’s Largest Online Community for Developers

7
0
3
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago

💡 CSS Tip!

A sliding liquid reveal effect, because why not! 🫗

https://css-tip.com/sliding-liquid/

Another demo powered by shape() and made easy with my online generators: https://css-generators.com/wavy-divider/

#CSS #HTML

A Sliding "Liquid Oozing" Reveal Effect
css-tip.com

A Sliding "Liquid Oozing" Reveal Effect

A fancy reveal animation powered by clip-path: shape()

6
1
6
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 7mo ago

It's been a while since my last CSS Pattern, so let's work on new ones!

https://css-pattern.com/circles-pills/

#CSS #HTML

CSS Pattern: Circles Pills
css-pattern.com

CSS Pattern: Circles Pills

Circles & Pills pattern made with CSS gradients, an optimized code and modern CSS.

7
0
2
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago

Who found the easter egg in my CSS-only Dino game? 🥚

A "rocket mode" to fly above everything! 👀

Give it a try: https://css-tip.com/dino-game/

#CSS #HTML

CSS-only Chrome Dino Game
css-tip.com

CSS-only Chrome Dino Game

Recreating the famous Dino game by Google using pure CSS, and playable with the keyboard

5
0
3
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 5mo ago
Replying to
@niels@indieweb.social https://bsky.app/profile/css-only.dev/post/3ltent56jks2c
CSS by T. Afif (@css-only.dev)
Bluesky Social

CSS by T. Afif (@css-only.dev)

They did it. A framework bult on the top of Tailwind to avoid the "ugly" HTML and the endless class names. Looks quite familiar to what we can already do with a "style.css" file. At least they acknowledge that the HTML is ugly.

3
2
0
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 7mo ago

💡 CSS Tip!

For years, we've had the "z-index, stacking context" nightmare, but we will soon have a worse nightmare related to Anchor Positioning 😱

When it doesn't work, it's frustrating, so it's time to learn how it really works.

https://css-tip.com/anchor-issues/

It's not as simple as you might think!

#CSS #HTML

Why is Anchor Positioning not working?
css-tip.com

Why is Anchor Positioning not working?

Learn the edge cases that prevent anchor positioning from working correctly

5
2
6
1
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago

💡 CSS Tip!

Add an infinite wobbling animation to your image with a simple code.

https://css-tip.com/wobbling-animation/

Powered by "complex" shape()s that you can easily get from my online generator!

https://css-generators.com/fancy-frame/

#CSS #HTML

Add a Wobbling Animation to your Images
css-tip.com

Add a Wobbling Animation to your Images

Create an infinite fancy animation using clip-path and shape()

4
0
3
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 5mo ago
Replying to
@scrwd@mastodon.social with that code no. The technique I am using requires same width logos and a variable to control the number of visible logos (which is generally smaller than the total of the logos). Everything is explained here: https://frontendmasters.com/blog/infinite-marquee-animation-using-modern-css/ What you want will require a complete different code and I am not sure we can have something generic that handle different widths
frontendmasters.com

Infinite Marquee Animation using Modern CSS

A row of logos that animate forever perfectly and don't have any duplicated HTML or JavaScript at all is quite a trick. Thanks modern CSS!

1
0
0
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago
Replying to
@ppk Your floater element has a fixed width, you have a fixed margin-left for the p element and they have a max-width so you can do the following calculation: max-width: min(680px,100cqw - 332px - 380px) and you set container-type: inline-size to HTML to get the 100cqw and then you adjust when the layout change with the media queries
1
6
0
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago

RE: https://mastodon.social/@csstricks/116335548662855451

Years ago, creating CSS shapes was a tedious task. I had to find workarounds with a lot of gradients and math.

Now, using the shape() function, I can easily create complex shapes and animate them! 👇

#CSS #HTML

CSS-Tricks (@csstricks@mastodon.social)
Mastodon

CSS-Tricks (@csstricks@mastodon.social)

Attached: 1 image A crap-ton of shape() inspiration from none other than @css@front-end.social to help burn your Thursday. https://css-tricks.com/complex-css-shapes-with-shape-function/

1
0
0
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 20mo ago
Replying to
@kizu@front-end.social I once tried to explore this path by removing the unit from any value but I only got a hacky chrome-only experimentation where I had to deal with big numbers: https://css-tip.com/length-to-integer/ Dealing with each unit then do a merge is indeed a good idea 👍
Remove the unit from any CSS value
css-tip.com

Remove the unit from any CSS value

A simple CSS trick to transform a length value into a number without its unit

2
0
0
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago
Replying to
Boing! Demo: https://codepen.io/t_afif/full/YPGeXgy via :codepen: @codepen#CSS #HTML
BOINNGGGGGG!
codepen.io

BOINNGGGGGG!

https://css-loaders.com/squishy/...

0
0
2
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago
Replying to
@inthehands The border-only version? Only chrome is supporting it as far as I know. The other browsers support the default (filled) version
0
1
0
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago
Replying to
@ppk we may find a "specific" workaround to the "specific" structure you are working on.
0
8
0
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago
Replying to

@ppk It would be the same complexity as what you are doing for --contentmd since it only changes when that variable changes.

Another alternative is to make the p element container-type: inline-size and you have max-width: 100cqw (but the float behavior will be slightly different as they will wrap as a block)

0
4
0
0
Open post
CSS by T. Afif :verified: @css@front-end.social
· 6mo ago
Replying to
@ppk Yes, the whole p will now float instead of the content inside it. add a border to the p element and toggle the container-type to see what is happening.
0
0
0
0
Back
313k7r1n3
Elektrine

Tor hidden service

elekhj7afj4qnrr4yd3bkzslsyo5jgfxw3orgjkhlcxifueodybyiiad.onion

I2P eepsite

j6b6cyk6gjmepjih7jjadxgxvvf3lzzujljuu2v4biemzpg3naya.b32.i2p

Platform

  • Email
  • Chat
  • Timeline
  • VPN
  • DNS

Company

  • About
  • Pricing
  • Contact
  • FAQ
  • Lite (no JS)

Legal

  • Terms of Service
  • Privacy Policy
  • Transparency Report
  • Report Abuse
  • Warrant Canary
  • VPN Policy

Support

  • support@elektrine.com
  • Report Security Issue
Mail client setup IMAP mail.elektrine.com:993 POP3 mail.elektrine.com:995 SMTP mail.elektrine.com:465
© 2026 Elektrine. All rights reserved. Server: 20:55:25 UTC