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

I've been in this industry long enough to see things constantly come & go. #React is no different - it'll be replaced by other frameworks soon & those will be hot for a bit. Then that one will be replaced & so on. Learn your basics! #HTML #CSS, plain #JS. Those are the only things that don't come & go & will take you through your entire career, regardless of what's cool right now. Will I still be coding #WordPress in 10 years? Who knows! But my knowledge of #PHP will carry me on.

andy, to CSS
@andy@bell.bz avatar

Happy 27th birthday to .

It also takes 27 utility classes to style a button with tailwind.

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

The only way to 'avoid the cascade' is by not writing . Every web style, no matter how or where we write it, participates in the cascade.

CSS wouldn't even be possible without a cascade of some kind. Since it's possible to write conflicting styles, browsers need some way to resolve those conflicts. That's all the cascade is.

We can imagine different rules for that process – what we have now wasn't the original proposal, & we've made updates recently – but there has to be something.

Freeplay, to mastodon

Mastodon Modern is a CSS style I've made that gives the platform a nicer look!

You can install it with the Stylus browser extension here:
: https://userstyles.world/style/4773/mastodon-modern

Install for your own instance:
: https://codeberg.org/Freeplay/Mastodon-Modern

s427, to CSS French
@s427@lou.lt avatar

👋 Salut Mastodon!

Je suis à la recherche de mon prochain boulot! Je suis dev front-end / intégrateur CSS avec 14 ans d'expérience dans une petite entreprise sur des projets d'ampleurs et de natures très variées, donc assez polyvalent, avec un bon sens du détail et l'amour du travail bien fait. Je cherche plutôt un job en présentiel (ou mixte) dans la région genevoise, donc si vous entendez quelque chose, pensez à moi! 🤗

Les boosts portent chance!

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

👀 Looks like WebKit is adding support for alt text in content: https://github.com/WebKit/WebKit/pull/22185

Usage:

.new::before { content: "★" / "New!"; }  

The text can also come from an attribute, using attr():

.new::before { content: "★" / attr(data-label); }  

See https://www.stefanjudis.com/today-i-learned/css-content-accepts-alternative-text/ by @stefan for a post on the subject.

Supported in Chrome since version 77 😎

pawelgrzybek, to webdev
@pawelgrzybek@mastodon.social avatar

A quick reminder, folks. If you haven't already, it is the perfect time to catch up with every article on these two amazing advent calendars.

HTMLHell by @matuzo
https://www.htmhell.dev/adventcalendar/

12 Days of Web by @5t3ph
https://12daysofweb.dev

#html #css

Edent, to CSS
@Edent@mastodon.social avatar

🆕 blog! “Using date-based CSS to make old web pages look old”

How do you know you're looking at an old website? You may have found a page which has lots of interesting information, but how can you tell it's a modern and relevant result? Some websites don't contain dates in their URls. There may not be a © date or publication date shown on the page. […]

👀 Read more: https://shkspr.mobi/blog/2023/12/using-date-based-css-to-make-old-web-pages-look-old/

#css #design #history #HTML

w3cdevs, to webdev
@w3cdevs@w3c.social avatar

📢 Congrats to editors Matt Garrish, @ivan_herman and @dauwhe for the newly published @w3c #WebStandard EPUB3.3, revolutionizing digital publishing #timetoadopt https://www.w3.org/TR/epub-33/

📘 EPUB 3.3 is a distribution and interchange format for digital publications and documents. It enables the representation, packaging, and encoding of structured and semantically enhanced web content, including #HTML, #CSS, #SVG, and more, in a single-file container

rolle, to mastodon
@rolle@mementomori.social avatar

This is kinda cursed and I feel kinda bad about this, but I just re-created Twitter UI to with only... wanted to see how quickly it's possible to do.

Now that I have everything in CSS vars (shame that Mastodon has them hardcoded at the moment), I can use this as base to create another theme for myself.

Edit: Fixed things to the screenshot as I'm kind of a perfectionist/OCD-person.

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

I have come to understand some people still do not know color-scheme, and that it's a nice way to make dark mode scrollbars without doing the things @eric will tell you is a bad idea :)

So here you go!

https://sarajoy.dev/blog/color-scheme/

miunau, (edited ) to CSS

Figured out how to color text black or white depending on background lightness without breaking the components down to HSL in #css

Edit: this is now a blog post! https://miunau.com/posts/dynamic-text-contrast-in-css/

Quick and dirty filter stacking

Assuming --bgColor contains your background color:

    span {<br></br>        color: var(--bgColor);<br></br>        filter: invert(1) grayscale(1) brightness(1.3) contrast(9000);<br></br>        mix-blend-mode: luminosity;<br></br>        opacity: 0.95;<br></br>    }<br></br>

This will turn to black around #AAAAAA. adjust brightness lower if you want it to turn to black earlier. play around with contrast as well, using low and high values.

After playing around with this (thanks @mia), we noticed there's some fringes happening at certain color values right when it is about to switch from black to white, so this might work best with colors that you get to control to some degree.

Less fringing with SVG filters

But! Here is a version that has no fringing:

Add this somewhere in your markup- it can be anywhere as long as the id bwFilter can be referenced.

<br></br><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="0"><br></br>    <defs><br></br>        <filter id="bwFilter" color-interpolation-filters="sRGB"><br></br>            <!-- Convert to grayscale based on luminance --><br></br>            <feColorMatrix type="matrix"<br></br>                values="0.2126 0.7152 0.0722 0 0<br></br>                        0.2126 0.7152 0.0722 0 0<br></br>                        0.2126 0.7152 0.0722 0 0<br></br>                        0 0 0 1 0"/><br></br>            <!-- Expand edges slightly to clean up any fringing --><br></br>            <feMorphology operator="dilate" radius="2"/><br></br>            <!-- Apply the threshold to determine if the color should be black or white --><br></br>            <feComponentTransfer><br></br>                <feFuncR type="linear" slope="-255" intercept="128"/><br></br>                <feFuncG type="linear" slope="-255" intercept="128"/><br></br>                <feFuncB type="linear" slope="-255" intercept="128"/><br></br>            </feComponentTransfer><br></br>            <!-- Composite step to clean up the result --><br></br>            <feComposite operator="in" in2="SourceGraphic"/><br></br>        </filter><br></br>    </defs><br></br></svg><br></br>

Then just reference it in your css:

span {<br></br>    color: var(--bgColor);<br></br>    filter: url(#bwFilter);<br></br>}<br></br>

tada! no fringing!

svg version here: https://codepen.io/miunau/pen/oNVaJoN?editors=1100

MerriNet, to firefox
@MerriNet@mastodon.social avatar

Just to push up the awareness: next year, 2024, will be 20 years old.

Firefox changed the web for the better. I could learn simply by experimenting.

During these years Firefox has been the most responsible browser around. While it has had it's own share of bugs, I've never experienced a lot of issues with new features. Usually once a new feature has shipped it has worked well.

I can't say the same of the remaining two other alternative browser engines.

So thanks, Firefox.

davidrevoy, to webdev
@davidrevoy@framapiaf.org avatar

🌜 🦉 Things I did today: my websites now automatically switch to a dark theme if your browser has one.

rachelandrew, to CSS
@rachelandrew@front-end.social avatar
Meyerweb, to CSS
@Meyerweb@mastodon.social avatar

I am going to have so much fun with the random() value function when it ships. https://drafts.csswg.org/css-values-5/#random

paulox, to webdev
@paulox@fosstodon.org avatar

HTMX 1.9.7 has been released 🎉

htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext :picklerick:

https://github.com/bigskysoftware/htmx/releases/tag/v1.9.7

[#HTMX #HTML #Hypertex #HATEOAS #AJAX #CSS #Websockets #SSE

hotsauce, to webdev
@hotsauce@drupal.community avatar

🎉 Firefox 121 is officially released with :has() support!

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

The 80-20 (Pareto) rule:

The first 20% of your CSS should be responsible for 80% of your styling.

Jbasoo, to CSS
@Jbasoo@mastodon.social avatar

I got carried away last night after reading @bramus post on scroll direction detection using . It turns out you can control sprites in 8 directions! With zero !

https://jamesbasoo.com/blog/scroll-driven-pixel-art-sprite/

Retro style pixel art character walking in various directions

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

Years ago, @tabatkins pointed out…

".ಠ_ಠ { --(╯°□°)╯: ︵┻━┻; } is valid CSS."

At the time, it required JS to become functional. But with style queries, we're back in table-flipping business!

(Currently only Blink browsers and Webkit beta)

https://codepen.io/miriamsuzanne/pen/XWGvLzZ

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

by @chriscoyier

  • Container Queries (Size & Styles)
  • Container Units
  • :has()
  • View Transitions
  • Nesting
  • Scroll-Driven Animations
  • Anchor Positioning
  • Scoping
  • Cascade Layers
  • P3 Colors
  • Color Mixing
  • Margin Trim
  • Text Wrapping
  • Subgrid

https://frontendmasters.com/blog/what-you-need-to-know-about-modern-css-spring-2024-edition/

:has() demo screenshot
nesting demo screenshot
scroll driven animation explanation

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

📝 Misconceptions about CSS Specificity

To remove some of the confusion, here’s a list of misconceptions about Specificity in CSS …

https://www.bram.us/2024/05/05/misconceptions-about-css-specificity/

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