Skip to content

Conversation

@jellydeck
Copy link
Contributor

@jellydeck jellydeck commented Feb 7, 2026

update the general style of buttons, group buttons and links to be consistent with our design language.

also, removed global css as Input component seems to be done.
Thanks @alexdln @essenmitsosse for feedback, enjoyed working together :)

@vercel
Copy link

vercel bot commented Feb 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 13, 2026 5:47am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 13, 2026 5:47am
npmx-lunaria Ignored Ignored Feb 13, 2026 5:47am

Request Review

@vercel
Copy link

vercel bot commented Feb 7, 2026

@jellydeck is attempting to deploy a commit to the serhalp's projects Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link

codecov bot commented Feb 7, 2026

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/pages/package/[[org]]/[name].vue 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@thasmo
Copy link
Contributor

thasmo commented Feb 8, 2026

  1. focus ring is not in foreground
image
  1. accent color is not used on some elements
image image image
  1. cut off focus-ring (same on prod)
image

variant === 'primary',
'text-bg bg-fg border-fg hover:(bg-fg/80)': variant === 'primary',
'text-fg bg-bg hover:(bg-fg/10 border-fg/10)': variant === 'secondary',
'opacity-40 cursor-not-allowed border-transparent': disabled,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

border-transparent will be at the same time as border-border

Comment on lines 31 to +38
:class="{
'inline-flex': !block,
'flex': block,
'text-sm px-4 py-2': size === 'medium',
'text-xs px-2 py-0.5': size === 'small',
'bg-transparent text-fg hover:enabled:(bg-fg/10) focus-visible:enabled:(bg-fg/10) aria-pressed:(bg-fg/10 border-fg/20 hover:enabled:(bg-fg/20 text-fg/50))':
variant === 'secondary',
'text-bg bg-fg hover:enabled:(bg-fg/50) focus-visible:enabled:(bg-fg/50) aria-pressed:(bg-fg text-bg border-fg hover:enabled:(text-bg/50))':
variant === 'primary',
'text-bg bg-fg border-fg hover:(bg-fg/80)': variant === 'primary',
'text-fg bg-bg hover:(bg-fg/10 border-fg/10)': variant === 'secondary',
'opacity-40 cursor-not-allowed border-transparent': disabled,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formally we have a chance that button will be disabled without this prop. It would be better to style disabled buttons using :disabled

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also a comment about this being a regression that is marked as resolved, but it isn't.

<component
:is="props.as || 'div'"
class="flex items-center shrink-0 ms-auto [&>*:not(:first-child)]:rounded-s-none [&>*:not(:first-child)]:border-s-0 [&>*:not(:last-child)]:rounded-e-none"
class="inline-flex items-stretch [&>*:not(:first-child)]:(-ms-px rounded-is-none) [&>*:not(:last-child)]:rounded-ie-none [&>*:hover]:(relative z-40) [&>*:focus-visible]:(relative z-40)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to turn off scale here as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabling scale effect on active and hover

@@ -1,10 +1,8 @@
<template>
<div class="relative flex min-w-28 justify-end">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

min-w-28 was to reduce CLS for authorized users (same in AccountMenu)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see, i'll use same min-w-28 then

<NuxtLink
v-else
class="group/link gap-x-1 items-center"
class="group cursor-pointer gap-x-1.5 items-center rounded-sm outline-transparent active:scale-[0.98] focus-visible:(outline-2 outline-accent) transition-colors duration-200"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restore group/link please.

Users of the component from the outside shouldn't be bothered by the presence of group (and they shouldn't have artifacts if they also use group internally)

Copy link
Contributor Author

@jellydeck jellydeck Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alrighty, now all link styles are under group/link variant

Copy link
Contributor Author

@jellydeck jellydeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted styles as per discussion

Comment on lines 31 to +38
:class="{
'inline-flex': !block,
'flex': block,
'text-sm px-4 py-2': size === 'medium',
'text-xs px-2 py-0.5': size === 'small',
'bg-transparent text-fg hover:enabled:(bg-fg/10) focus-visible:enabled:(bg-fg/10) aria-pressed:(bg-fg/10 border-fg/20 hover:enabled:(bg-fg/20 text-fg/50))':
variant === 'secondary',
'text-bg bg-fg hover:enabled:(bg-fg/50) focus-visible:enabled:(bg-fg/50) aria-pressed:(bg-fg text-bg border-fg hover:enabled:(text-bg/50))':
variant === 'primary',
'text-bg bg-fg border-fg hover:(bg-fg/80)': variant === 'primary',
'text-fg bg-bg hover:(bg-fg/10 border-fg/10)': variant === 'secondary',
'opacity-40 cursor-not-allowed border-transparent': disabled,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<component
:is="props.as || 'div'"
class="flex items-center shrink-0 ms-auto [&>*:not(:first-child)]:rounded-s-none [&>*:not(:first-child)]:border-s-0 [&>*:not(:last-child)]:rounded-e-none"
class="inline-flex items-stretch [&>*:not(:first-child)]:(-ms-px rounded-is-none) [&>*:not(:last-child)]:rounded-ie-none [&>*:hover]:(relative z-40) [&>*:focus-visible]:(relative z-40)"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabling scale effect on active and hover

@@ -1,10 +1,8 @@
<template>
<div class="relative flex min-w-28 justify-end">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see, i'll use same min-w-28 then

<NuxtLink
v-else
class="group/link gap-x-1 items-center"
class="group cursor-pointer gap-x-1.5 items-center rounded-sm outline-transparent active:scale-[0.98] focus-visible:(outline-2 outline-accent) transition-colors duration-200"
Copy link
Contributor Author

@jellydeck jellydeck Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alrighty, now all link styles are under group/link variant

Comment on lines 84 to 86
'justify-start font-mono text-fg hover:(decoration-accent) focus-visible:(text-accent outline-offset-2)':
isLink,
'justify-center font-mono border border-border rounded-md transition-all duration-200':
'justify-center font-mono border border-solid border-border rounded-md outline-offset-2':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These outline-offsets-2 should be set on the first class because they should apply to all links regardless of type. Also the use is inconsistant, sometimes it's always set, sometimes only on focus-visible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for button i used offset-2 otherwise it already has focus-visible:(outline-2 outline-accent) . this is to create a better seperation.

Comment on lines +90 to +93
'text-bg bg-fg border-fg hover:(bg-fg/80) aria-[current=true]:(bg-fg/80)':
variant === 'button-primary',
'text-fg bg-bg hover:(bg-fg/10 border-fg/10) aria-[current=true]:(bg-fg/10 border-fg/10)':
variant === 'button-secondary',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't change the style anymore when the button is focused. Is that on purpose or by accident? The same goes for not having the text in accent colors, for button-styled links.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it's going to be a button and on first class we have focus-visible:(outline-2 outline-accent) and outline-offset-2 on button.
it will have focus style applied as intended.

'underline-offset-[0.2rem] underline decoration-1 decoration-fg/30':
!isLinkAnchor && isLink && !noUnderline,
'justify-start font-mono text-fg hover:(decoration-accent text-accent) focus-visible:(decoration-accent text-accent) transition-colors duration-200':
'justify-start font-mono text-fg hover:(decoration-accent) focus-visible:(text-accent outline-offset-2)':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes doesn't change the text color to accent on hover, but on focus. This seems inconsistant with the button styles.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text-accent was just too strong, will use shade of fg color if we still need a dim variant

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I think especially on light mode it can be too subtle now.

<span
v-else-if="isLinkAnchor && isLink"
class="i-carbon:link size-[1em] opacity-0 group-hover/link:opacity-100 transition-opacity duration-200"
class="i-carbon:link size-[1em] opacity-0 group-hover/link:opacity-100 group-focus-visible/link:opacity-100 transition-opacity duration-200"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Comment on lines 88 to +91
<button
ref="triggerRef"
type="button"
class="cursor-pointer flex items-center gap-1.5 px-2 py-2 font-mono text-xs text-fg-muted bg-bg-subtle border border-border-subtle border-solid rounded-md transition-colors duration-150 hover:(text-fg border-border-hover) active:scale-95 focus:border-border-hover focus-visible:outline-accent/70"
class="flex items-center gap-1.5 px-2 py-2 font-mono text-xs text-fg-muted bg-bg-subtle border border-border-subtle border-solid rounded-md transition-colors duration-150 hover:(text-fg border-border-hover) active:scale-95 focus:border-border-hover outline-transparent focus-visible:(outline-2 outline-accent outline-offset-2) hover:text-fg cursor-pointer"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of vanilla button in this PR which are updated. But most of them should be migrated to ButtonBase, instead of manually syncing the style. It is fine like that, but that change will happen soon anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, i wanted to keep scope of pr limited hence just updated to sync with current buttons style for now

@whitep4nth3r whitep4nth3r marked this pull request as draft February 12, 2026 16:02
@essenmitsosse
Copy link
Contributor

image

Those two have different variants, which is barely visible now.

@jellydeck
Copy link
Contributor Author

jellydeck commented Feb 13, 2026

@essenmitsosse
looks like class specificity issue on tag. fixed now.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants