@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.

moh_kohn, to CSS
@moh_kohn@mastodon.scot avatar

Can I detect clamp support using @supports?

css,
@css@front-end.social avatar

@moh_kohn

@supports (opacity: clamp(0,0,0)) {} ?

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

💡 CSS Tip!

Turn a simple input into single-digit inputs using a few lines of CSS. Useful for One-Time Password fields.
✅ No extra element (only one input element)
✅ Less than 15 CSS declarations
✅ Optimized with CSS variables

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

Online Version: https://css-tip.com/single-digit-inputs/

Showing the result of the linked demo. A One-Time password field using a single input element.

yuanchuan, to CSS
@yuanchuan@vis.social avatar

Chrome has a different behaviour from FF and Safari.

They used be the same. I'm not sure if the spec changes or Chrome has a bug in recent releases

https://codepen.io/yuanchuan/pen/bGydpjP

Source code grid { display: grid; width: 600px; height: 200px; background: ; grid-template-columns: repeat(10, 1fr); } grid > div { border: 2px solid ; width: 50%; aspect-ratio: 1; }

css,
@css@front-end.social avatar

@yuanchuan I think you have to disable the stretch alignment (align-items: start)

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

📝 New CSS Article!

After the "Ultimate Collection of CSS Shapes". It's time for "The Modern Guide for making CSS Shapes". 🤩

https://smashingmagazine.com/2024/05/modern-guide-making-css-shapes/ via @smashingmag

A huge compilation of many CSS Tricks I have been using since years in this guide. All the secrets for creating CSS shapes are there!

Enjoy reading my 100th CSS Article! 🥳

#CSS #HTML #web

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

💡 CSS Tip!

How much code is needed to create a Sparkle shape? ✨
Only one gradient and you can easily get the border-only variation.

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

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

#CSS #HTML

Two sparkle shapes. The second one is a border-only variation.

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

💡CSS Tip!

Using the new relative color syntax, you can easily extract the R,G,B channels of any color and use them as separate colors.

Useful when you want to do some color manipulation.

Online Version: https://css-tip.com/rgb-channels/

#CSS #HTML

css,
@css@front-end.social avatar

You can do the same thing with a different syntax using the color() function.

In both cases, you can either use "none" or "0". "none" is equivalent to "0" but has a special behavior when color interpolation is in play.

#CSS #HTML

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

@J12t overflow: auto can also fix your issue.

ben, to random
@ben@m.benui.ca avatar

Stack Overflow announced that they are partnering with OpenAI, so I tried to delete my highest-rated answers.

Stack Overflow does not let you delete questions that have accepted answers and many upvotes because it would remove knowledge from the community.

So instead I changed my highest-rated answers to a protest message.

Within an hour mods had changed the questions back and suspended my account for 7 days.

Diff view of a stack overflow question showing it being changed from the original text to a protest message, then being changed back again by a mod. Protest text reads: Why does OpenAI get to profit from our work? I have removed this question in protest of Stack Overflow's decision to partner with OpenAI. This move steals the labour of everyone who contributed to Stack Overflow with no way to opt-out. OpenAI has a history of flooding the web with inaccurate information and have explicitly stated that they will never pay creators for their work.

css,
@css@front-end.social avatar

@ben I think in the end you will lose more than you will win because the only thing that can happen is the dissociation of the content from your name which is unfortunate because they will keep your content but no one will know it' was yours

tixie, to CSS
@tixie@guerilla.studio avatar

round(), mod(), sign(), abs()CSS functions aren't in Chromium based browsers yet (only on Firefox and Safari) 😭
'tHaveNiceThings

https://caniuse.com/mdn-css_types_round
https://caniuse.com/mdn-css_types_mod
https://caniuse.com/mdn-css_types_sign
https://caniuse.com/mdn-css_types_abs

So… do you know if there ways to add some JS "polyfilling" (?) those functions to be able to use them in prototypes/technical demos. To allow everyone to be able to display them correctly no matter their browsers instead of just displaying a "only works on recent Firefox and Safari" banner?

css,
@css@front-end.social avatar

@tixie Some of them can be implemented with supported features

https://css-tricks.com/using-absolute-value-sign-rounding-and-modulo-in-css-today/

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

💡 CSS Tip!

To target the html element, you either use "html {}" or ":root {}" but thanks to CSS nesting you can simply use "& {}"

When used alone, the nesting selector will match the root element!

A one-character selector 🤯

⚠️ It has a lower specificity than html and :root

Online Version: https://css-tip.com/root-selector/

css,
@css@front-end.social avatar

@simevidas yes, it should be the same as if you used :where(html) {}.

css,
@css@front-end.social avatar
css, to CSS
@css@front-end.social avatar
css, to CSS
@css@front-end.social avatar
andybond, to random
@andybond@mastodon.social avatar

I now mark the books I’m currently reading with a ribbon on https://andy.bond/now!

Really cool stuff by @css ❤️

css,
@css@front-end.social avatar

@andybond nice little touch 👍

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

💡 CSS Tip!

Use modern CSS to add a status indicator to your avatar using less than 10 CSS declarations and without extra elements.
✅ Only the image element
✅ No pseudo-element
✅ Transparent gap
✅ Optimized with CSS variables

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

Online Version: https://css-tip.com/status-indicator/

#CSS #HTML

three rounded images with a status indicator at the bottom right

css,
@css@front-end.social avatar

You can also have a nice hover effect

#CSS #html

video/mp4

css,
@css@front-end.social avatar

We can easily change the position of the indicator by rearranging the margin/padding values.

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

#CSS #HTML

four images with status indicator

dansays, to CSS
@dansays@mastodon.social avatar

nerds, I need your help with a stupid layout problem!

css,
@css@front-end.social avatar

@dansays You cannot do this. Even with hacks and workaround it's very difficult

https://github.com/w3c/csswg-drafts/issues/191

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

I just finished my next #CSS article and it's a special one because it will be my 100th article! 🤯

A big piece with more than 6000 words 😬

It's by far the longest article I have ever wrote so I hope you will enjoy it 🤞

After 100 articles, I can say that writing is exhausting but satisfying 😅

https://css-articles.com/

css,
@css@front-end.social avatar

@geoff so let's 7000 words and "edited by Geoff" 😎

This will attract more people for sure!

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

In case you missed it, I released a huge collection of CSS Shapes

https://css-shape.com/

✅ Different variations for each shape
✅ Optimized code easy to adjust online
✅ One-click to copy the code
✅ More shapes are coming in the future

No more struggle creating CSS Shapes!

#CSS #HTML

Overview of different shapes from the linked resource

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

💡 CSS Tip!

Use Modern CSS to write Better CSS!

A lot of new features can help you optimize your code and reduce redundancy.
✅ CSS Nesting
✅ CSS Variables
✅ Media Query range features

Example of Old code: https://codepen.io/t_afif/pen/NWmopYY that you can transform into a Modern code: https://codepen.io/t_afif/pen/mdgvWPP

Online version: https://css-tip.com/better-modern-css/

Overview of the CSS from the second linked demo

css,
@css@front-end.social avatar

@robotalien CSS Nesting is supported by all major browser since Dec 2023: https://caniuse.com/css-nesting

css,
@css@front-end.social avatar

@robotalien yes I know how the calendar works 😅

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • rosin
  • thenastyranch
  • Durango
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • osvaldo12
  • GTA5RPClips
  • kavyap
  • megavids
  • InstantRegret
  • everett
  • tacticalgear
  • vwfavf
  • tester
  • normalnudes
  • modclub
  • ethstaker
  • khanakhh
  • cisconetworking
  • anitta
  • Leos
  • JUstTest
  • All magazines