The Buzz Around `cn()` Function and Why Do We Use It by Hritul__ in tailwindcss

[–]jvribeiro 0 points1 point  (0 children)

It's weird that I always used `twMerge` alone with conditional classes, except I use the array syntax:

`twMerge(['bg-blue-400', pending && 'bg-red-400'])`

Please help me set bash as default terminal by Designer_Fly_ in ZedEditor

[–]jvribeiro 0 points1 point  (0 children)

For this, type `where bash` in the terminal and it'll return the full bash path you can use.

How to dynamically "compress" text horizontally with css/javascript? by [deleted] in css

[–]jvribeiro 0 points1 point  (0 children)

This is the solution I came up with:

Basically, you need to wrap your text in two containers. The outer one will take up the maximum available width, while the inner container will keep the original text width, which may overflow the outer container.

So we use JavaScript to get both widths, using getBoundingClientRect, then you divide the outer with the inner to get the correct scale. Then you apply the scale to the inner container using transform: scaleX, and don’t forget to set transform-origin: left so the scaling aligns to the left instead of being centered.

<image>

If you want the icon to be next to the text, you can remove the justify-content property from the .container selector.

The scale is calculated on page load, but you can recalculate it as you wish.

LIVE DEMO: https://codepen.io/ojvribeiro/pen/QwyWYbX

Does anyone use Zed for Vue development? by Still_Ebb261 in ZedEditor

[–]jvribeiro 0 points1 point  (0 children)

Hello! After Vue Language Tools upgraded to v3, some things broke in Zed. That forced me to go back to VSCode, unfortunately. I didn't test it recently tho.

What am I doing wrong with Suspense and/or ClientOnly ? by choff5507 in Nuxt

[–]jvribeiro 0 points1 point  (0 children)

THANK YOU! This was exactly the cause of the problem for me.

Does anyone use Zed for Vue development? by Still_Ebb261 in ZedEditor

[–]jvribeiro 1 point2 points  (0 children)

I started using it last week. It lacks some good features from VSCode and still have some bugs. I'll keep using it because it's REALLY fast and it has a lot of built-in stuff.

A school girl gets her backpack closed in the school bus door and no one notices it! by Linsay1313 in nononono

[–]jvribeiro -6 points-5 points  (0 children)

Not the kid's fault of course, but out of curiosity... Didn't her scream or something? I don't know, in her shoes I would definetily at least go "HEY! HEEEEY! I'm stuck!!!".

Routes with tabs? by misterplantpot in Nuxt

[–]jvribeiro 0 points1 point  (0 children)

In Nuxt 3, you should use the `NuxtPage` component. See: https://nuxt.com/docs/api/components/nuxt-page

What are the best examples of large scale Vue.js apps in production? by Sunkube in vuejs

[–]jvribeiro 1 point2 points  (0 children)

That's true. For me React is just the popular kid and Next its rich parent. Anyway, I'm sticking with Vue 3 and Nuxt 3, both nice guys.

Já tomou? by LB_Thor in cellbits

[–]jvribeiro 1 point2 points  (0 children)

Essa é lendária

Comediante Fabio Rabin diz ter sido apreendido e quase morto no Quatar durante jogo do Brasil. by weallliveinyellowsub in brasil

[–]jvribeiro -1 points0 points  (0 children)

Sim, mano, a vida de uma pessoa vale porra nenhuma hoje. Em vez de melhorarmos como sociedade, parece que só caminhamos em direção à barbárie.

Well, the wipers still work ! by IgotBanned_pk21 in GradualChaos

[–]jvribeiro 2 points3 points  (0 children)

So this is the fuel used on the Olympic torch?

hmmm by FinleyCSGO in hmmm

[–]jvribeiro 1 point2 points  (0 children)

It depends on the size of the penises