@css@front-end.social
@css@front-end.social avatar

css

@css@front-end.social

A lot of 𝗖𝗦𝗦 stuff by 𝗧𝗲𝗺𝗮𝗻𝗶 𝗔𝗳𝗶𝗳

🏆 https://css-challenges.com
⚙️ https://css-generators.com
📝 https://css-articles.com
💫 https://css-loaders.com
🎨 https://css-pattern.com
🧩 https://css-shape.com
💡 https://css-tip.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.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

css, to SEO
@css@front-end.social avatar

#SEO / #a11y #accessibility question:

Suppose I have a home page and its content is nothing but different blocks (image + text) that link to internal pages. Does that count as a navigation and I have to use the <nav> element or It counts as the main content and a simple <ul> listing is enough?

css,
@css@front-end.social avatar

@urlyman I have this kind of pattern in many places so I am trying to see if there is a generic rule to it but if I have to be specific I can for example take one of my websites: https://css-generators.com/

The home page is some text + the said blocks. I am trying to improve the HTML to consider an <ul> listing and I am not sure if I have to also consider a <nav> or not.

css,
@css@front-end.social avatar

@s3thi actually, I see it as both content and navigation since the home page will basically serve as a way to get into other pages. I don't have more content expect for a title and maybe a footer

css,
@css@front-end.social avatar

@cwilcox808
actually, I am making the link cover the image to make sure it's clickable and I am also using focus-within so that with a keyboard navigation the whole block looks clickable as well.

Is that a bad idea?

css,
@css@front-end.social avatar

@cwilcox808 well, safari never like what I do

I have the superpower to break things on Safari and I have no way to run tests on it. 😅

css, to CSS
@css@front-end.social avatar

In case you missed it, my CSS Generators website counts no less than 10 online generators. Section divider, gradient shadows, custom border, custom corners, and more!

👉 https://css-generators.com 👈

Get an optimized code with modern CSS in no time!

Showing the banners of the different generator websites.

css,
@css@front-end.social avatar

@vintprox and another big resource is coming next week.

A new CSS website is in progress 🤞

pixelambacht, to music
@pixelambacht@typo.social avatar

Please help me find this song!

I think it's a relatively new/modern song. It sounded funk/soul-y to me, but it's far out of my usual noisy music circle.

It's upbeat, heard it a few times in a hip hotel lounge. I googled it then, I think it was by a black artist.

Title is something with fire, or burning, or burning up?

#music

css,
@css@front-end.social avatar

@pixelambacht it would be funny to see if "ChatGPT and co" can find it 😅

css, to CSS
@css@front-end.social avatar

💡 CSS Tip!

Use modern CSS to create a fancy Zig-Zag border around images using a few lines of code.
✅ Only one element (the image tag)
✅ No pseudo-element
✅ Optimized with CSS variables
⚠️ Not suitable for touch screen (the sharp edges may hurt you)

Demo: https://codepen.io/t_afif/full/OJGBvmp via :codepen: @codepen

Online Version: https://css-tip.com/zig-zag-box/

Two images with zig-zag borders

css,
@css@front-end.social avatar

@AmeliaBR yes, and with border-mask (or border-image) we cannot define multiple gradients and different sizes so getting such results will be tricky without an image or an SVG.

btw, the combination of mask-border and border-image can be very interesting. I already explored border-image (https://www.smashingmagazine.com/2024/01/css-border-image-property/) and I am into mask-border but the support is still very low

css,
@css@front-end.social avatar

And why not a gallery with Zig-Zag images 🤩

Demo: https://codepen.io/t_afif/full/bGJmzPB via :codepen: @codepen

css, to CSS
@css@front-end.social avatar

💡 CSS Tip!

Create a ⭐️ Star shape using clip-path and only 5 points (instead of 10).

Three different codes to create the same shape
1⃣ Precise version using math
2⃣ Calculated version without math
3⃣ Simplified version with easier coordinates values

Demo: https://codepen.io/t_afif/full/jORvmKG via :codepen: @codepen

Online Version: https://css-tip.com/star-shape/

three star shapes

css,
@css@front-end.social avatar

@mdavis not really because we cannot repeat clip-path stuff so I am obliged to rely on mask if I want multiple star because I can use "repeat"

css,
@css@front-end.social avatar

The difference between the versions is that the first and second ones consider the inscribed circle of a square to draw the different points while the third one considers the smallest rectangle that can contain the star shape.

css, to CSS
@css@front-end.social avatar

Do you want to get started with creating CSS Shapes? Check my latest article @Verpex

https://verpex.com/blog/website-tips/css-tricks-to-master-the-clip-path-property

A beginner-friendly tutorial to start using the clip-path polygon() with a few tricks to help you create shapes faster and easier.

I should have written this since a while but it's never too later.

css,
@css@front-end.social avatar

In my last article, I show how you can easily transform an existing polygon to create different variations from one shape.

A trick I use a lot to create many shapes with 0 effort!

1 shape can give me 4 shapes (or more) so to create 100, I only need to create 25 (or less) 😉

Showing how to transform the polygon of one ribbon shape into three other variations

GoOz, to CSS French
@GoOz@mamot.fr avatar

I tried to get my head around this for an hour but we still can't have in #CSS only a dynamic text with a dynamic font-size so that whatever the string I'm using the text will always be perfectly fitting its container’s width, right?

css,
@css@front-end.social avatar

@GoOz

https://kizu.dev/fit-to-width-text/ not ready for production but an interesting experimentation by @kizu

css, to CSS
@css@front-end.social avatar

Another article and another single element experimentation using images!

Check my latest article @smashingmag

https://smashingmagazine.com/2024/04/sliding-3d-image-frames-css/

A lot of cool CSS Tricks to create a fancy reveal animation 👇

A fancy hover effect to reveal image inside a 3D box

css, to webdev
@css@front-end.social avatar

💡CSS Tip!

Use modern CSS to cut the corner of an image with a pixelated effect because why not!
✅ Only one element (the image tag)
✅ Only 4 properties
✅ Optimized with CSS variables

Demo: https://codepen.io/t_afif/full/NWmzxQj via :codepen: @codepen

Online Version: https://css-tip.com/pixelated-corner/

Two image with cut corners

amber, to CSS
@amber@front-end.social avatar

Dear #CSS gods,

please let us specify object-position x and y separately in future. This sucks:

css,
@css@front-end.social avatar

@amber use CSS variables

object-position: var(--x) var(--y)

then you update them using classes

.left {--x: left}
.bottom {--y: bottom}

and so on

simevidas, to random
@simevidas@mastodon.social avatar

How do I push the outline to the right so that it doesn’t go over the image? I know there exists a CSS declaration for this, but I forgot what it is.

https://jsbin.com/deyugur/edit?html,css,output

edit: Just to make sure that I don’t get any clear: left answers, the clear property pushes the list below the image. That’s not what I want.

css,
@css@front-end.social avatar

@simevidas overflow:auto on the ul

Meyerweb, to CSS
@Meyerweb@mastodon.social avatar

A thing I did today:

--inset: transparent 0.67rem, black 0.5rem;  
mask:  
 linear-gradient(45deg, var(--inset)),  
 linear-gradient(135deg, var(--inset)),  
 linear-gradient(225deg, var(--inset)),  
 linear-gradient(315deg, var(--inset))  
;  
mask-composite: intersect;  

(Note: does not play particularly well with borders, outlines, or drop shadows.)

The reason I did this instead of clip-path is to angle-snip the corners off elements of any size or aspect ratio. A small thing, but I like it.

css,
@css@front-end.social avatar

@Meyerweb You may probably like my online generator for such stuff: https://css-generators.com/custom-corners/#3

css, (edited ) to CSS
@css@front-end.social avatar

💡 CSS Tip!

Use modern CSS to create those famous rounded tabs with inner curves.
✅ No extra element & No pseudo-element
✅ Less than 10 CSS declarations to get the three variations
✅ One variable to control the curvature
✅ Works with gradient coloration

Demo: https://codepen.io/t_afif/pen/JjVpPmr via :codepen: @codepen

Online Version: https://css-tip.com/rounded-tab/

css, to CSS
@css@front-end.social avatar

💡 CSS Tip!

Use the round() function and create a fluid typography with a discrete function instead of a continuous one.

Define the step and get precise values within a specific range. Very useful if you have some calculation based on the font-size like using the em unit. No more rounding issue!

Demo: https://codepen.io/t_afif/pen/RwOxLNQ via :codepen: @codepen

Online Version: https://css-tip.com/fluid-typography/

css, to CSS
@css@front-end.social avatar

The triangle🔺 is probably the most popular CSS shape and I still see old and obsolete methods to create it.

⚠️ STOP DOING THIS ⚠️

Here is a collection of CSS-only triangles made with modern CSS:

👉 https://css-generators.com/triangle-shapes/

✅ Only one element
✅ Optimized code with no magic numbers
✅ Border-only & rounded corners variations

Showing the triangle shapes collection from the provided links

css,
@css@front-end.social avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • DreamBathrooms
  • khanakhh
  • GTA5RPClips
  • osvaldo12
  • magazineikmin
  • mdbf
  • InstantRegret
  • rosin
  • Youngstown
  • slotface
  • everett
  • Durango
  • JUstTest
  • ngwrru68w68
  • modclub
  • tester
  • tacticalgear
  • cubers
  • thenastyranch
  • cisconetworking
  • ethstaker
  • Leos
  • provamag3
  • normalnudes
  • anitta
  • lostlight
  • All magazines