reflex icon indicating copy to clipboard operation
reflex copied to clipboard

add default underline for links

Open Lendemor opened this issue 1 year ago β€’ 2 comments

def test_link(**props):
    return rx.tooltip(
        rx.link("Test link", href="/", **props),
        content=str(props),
    )


@rx.page(route="links")
def links():
    return rx._x.layout(
        rx.text(
            test_link(underline="none"),
            test_link(underline="hover"),
            test_link(underline="always"),
        )
    )

Lendemor avatar Apr 23 '24 16:04 Lendemor

I think i'm still unclear on the why for this change. @picklelo do we really want to override the radix default link behavior?

In my sample app, the default link (from main) is a different color than the main text and looks and acts like a link with the underline on hover.

This change works fine in my testing. But the change just seems kind of arbitrary and will affect the look and feel of existing apps.

We had discussion about this on Discord yesterday, the result was that we would keep the default behaviour for underline, but add the color tweak on ':hover', are you fine with that?

Lendemor avatar Apr 25 '24 17:04 Lendemor

In the discord discussion nikhil said

I think we can leave it as is TBH, the links are a different color already aren't they?

And i guess i interpreted that as, "leave it as radix has it" (i.e. underline on hover, no color change). But maybe he meant leave it as it is in this PR?

I don't feel too strongly about the change either way, but like i said, it seems like an arbitrary change from the defaults that radix ships, so i was wondering if we had an actual reason for changing it besides our own taste preferences.

masenf avatar Apr 25 '24 17:04 masenf