Posts

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

yuanchuan, to random
@yuanchuan@vis.social avatar

Sometimes I'm struggled with the performance and inconsistent behaviour between browsers while using css-doodle. This often leads me to consider switching to other tools.

But I really like the syntax of css-doodle. So maybe I could reimplement it using another render layer other than CSS, like canvas?

kristinHenry,
@kristinHenry@vis.social avatar

@yuanchuan I'm sure you already know this, but you can also combine canvas and svg, by layering divs on top of each other. I'd love to see what you'd do with that.

yuanchuan,
@yuanchuan@vis.social avatar

@kristinHenry Right, the only problem is when I want to export and save the result, a headless browser is needed to take the screenshot programatically.

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

#CSS #grid #aspectratio

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

css,
@css@front-end.social avatar

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

yuanchuan, to random
@yuanchuan@vis.social avatar

📝 Time-based CSS Animations
https://yuanchuan.dev/time-based-css-animations

yuanchuan,
@yuanchuan@vis.social avatar

@kizu That's a strange bug, fixed by wrapping with a calc()

counter-reset: t calc(var(--t));

bramus,
@bramus@front-end.social avatar

@yuanchuan @kizu One downside: animating custom properties (currently) happens on the main thread, which is unfortunate.

https://www.bram.us/2023/02/01/the-gotcha-with-animating-custom-properties/

yuanchuan, to CSS
@yuanchuan@vis.social avatar
yuanchuan, to random
@yuanchuan@vis.social avatar

font-size: 100cqmin

iamdtms,
@iamdtms@mas.to avatar

@yuanchuan Cool! + line-height: calc(1lh + 1px);

yuanchuan, to random
@yuanchuan@vis.social avatar
yuanchuan, to random
@yuanchuan@vis.social avatar
yuanchuan, to random
@yuanchuan@vis.social avatar

Is there a better way in SVG to prevent ID collisions among multiple inline SVG elements (e.g. gradients), other than randomizing or adding prefixes to IDs?

simevidas,
@simevidas@mastodon.social avatar
yuanchuan, to random
@yuanchuan@vis.social avatar
yuanchuan,
@yuanchuan@vis.social avatar
yuanchuan, to CSS
@yuanchuan@vis.social avatar
yuanchuan,
@yuanchuan@vis.social avatar

@sarajw Ah I see. It's hard to share them right now since the original size of the canvas is 2000x and bigger. I have to ship my tool along with them in order to preview in the browser :D

I will open source it one day.

sarajw,
@sarajw@front-end.social avatar

@yuanchuan Oh nice! Not to worry then :)

yuanchuan, to random
@yuanchuan@vis.social avatar

New post: Fun with stroke-dasharray
https://yuanchuan.dev/fun-with-stroke-dasharray

simevidas,
@simevidas@mastodon.social avatar

@yuanchuan It might be worth adding no-JS fallback text to <css-doodle> (something like “enable JavaScript to view demo”). I have JavaScript disabled by default in my desktop browser, and I didn’t even notice that there are inline demos in the article.

yuanchuan,
@yuanchuan@vis.social avatar
yuanchuan, to random
@yuanchuan@vis.social avatar

📝 New Post

Simplifying CSS Variable Calculations
https://yuanchuan.dev/simplifying-css-variable-calculations

yuanchuan, to random
@yuanchuan@vis.social avatar

SVG animation

SVG animation

kristinHenry,
@kristinHenry@vis.social avatar

@yuanchuan ooooooooh! so nice

yuanchuan, to random
@yuanchuan@vis.social avatar

Maintaining a tailwind website is painful.

yuanchuan,
@yuanchuan@vis.social avatar

@iamdtms My eyes hurt at those long class names

iamdtms,
@iamdtms@mas.to avatar

@yuanchuan
Not just long but wanna-be-semantic-but-it-is-not-that-approach. I followed tailwind from a HUGE distance.

yuanchuan, to random
@yuanchuan@vis.social avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines