Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Link underline thickness inconsistency across post terms and author #612

Closed
beafialho opened this issue Oct 22, 2024 · 9 comments · Fixed by #616
Closed

Link underline thickness inconsistency across post terms and author #612

beafialho opened this issue Oct 22, 2024 · 9 comments · Fixed by #616
Labels
[Type] Bug An existing feature does not function as intended.

Comments

@beafialho
Copy link
Contributor

If you notice, post author name has a thicker underline than categories. This is happening in all style variations.

Image
Image
Image
Image

@beafialho beafialho added the [Type] Bug An existing feature does not function as intended. label Oct 22, 2024
@beafialho beafialho changed the title Link underline thickness inconsistency across post terms Link underline thickness inconsistency across post terms and author Oct 22, 2024
@carolinan
Copy link
Contributor

In the editor, only the author name is an actual link. It uses the custom CSS that the theme adds to all links:

a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

The post term is a span, so it does not use the link styles.

@beafialho
Copy link
Contributor Author

beafialho commented Oct 22, 2024

Can we match the look of all the link underlines?

@carolinan
Copy link
Contributor

I don't understand what you mean.
The category is only a link on the front. In the editor it is not a link underline.

@carolinan
Copy link
Contributor

carolinan commented Oct 22, 2024

I think you may be suggesting that in the editor stylesheet, this CSS

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

Should apply to all blocks that have the text decoration option set to underline.

@carolinan
Copy link
Contributor

I did a very quick test.
When the text-decoration option is enabled on the block, there is no class name that we can target with CSS.

The only thing we have to identify that the option is enabled, is this inline style on the block:
style="text-decoration: underline;"

@juanfra
Copy link
Member

juanfra commented Oct 22, 2024

Hi @beafialho - Thank you for opening this one. I can see this is noticeable in the editor's context. Here's a screencast of how I see it on trunk

Screen.Recording.2024-10-22.at.14.42.55.mov

I also remember there was an issue to customize the links so that they were "less rough". But now I'm a bit in doubt about what the expectation would be for links.

Can you please confirm what the expected behavior is when fixing this issue? We have two open PRs for this, one that's fixing the display in the editor so that there's no difference between the post terms and author, and the other approach where we are adjusting the links site-wide.

Screencast of this PR

Screen.Recording.2024-10-22.at.14.56.53.mov

Screencast of this PR

Screen.Recording.2024-10-22.at.14.57.27.mov

@juanfra juanfra linked a pull request Oct 22, 2024 that will close this issue
@beafialho
Copy link
Contributor Author

Thank you! I just tested both. It seems that links in #616 work as intended 👍

@carolinan
Copy link
Contributor

The category is not a link in the Site Editor, with 616 the editor and front does not match.

@juanfra
Copy link
Member

juanfra commented Oct 22, 2024

I believe we can apply #615 on top of #616 then, as they both can coexist. Nevermind, I just checked and it's not possible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
[Type] Bug An existing feature does not function as intended.
Projects
None yet
3 participants