Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAMEL-15371: underline links #452

Merged
merged 2 commits into from Aug 14, 2020
Merged

Conversation

AemieJ
Copy link
Contributor

@AemieJ AemieJ commented Aug 8, 2020

No description provided.

@@ -149,6 +149,16 @@
.doc a {
color: var(--link-font-color);
word-break: break-word;
text-decoration: underline;
text-underline-position: under;
Copy link
Member

Choose a reason for hiding this comment

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

This bit looks a bit weird to me.

Suggested change
text-underline-position: under;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You require this particular line so that there is a minimum distance between the underline and the text.

Copy link
Member

Choose a reason for hiding this comment

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

Right, so this is with text-underline-position: under:

Screenshot_2020-08-11 Home - Apache Camel

and without:

Screenshot_2020-08-11 Home - Apache Camel(1)

I think what you're reacting to is that the underline is quite noticeable, perhaps adding to make it lighter:

Suggested change
text-underline-position: under;
text-decoration-thickness: 1px;
text-decoration-style: dotted;

Would help, this is how it renders in Firefox:

Screenshot_2020-08-11 Home - Apache Camel(3)

Copy link
Member

@zregvart zregvart left a comment

Choose a reason for hiding this comment

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

This needs to be rebased.

@zregvart
Copy link
Member

Not sure about the underline being below the descenders. My personal preference would be

text-decoration: underline;
text-decoration-style: dotted;

There are some methods on different underline styles at css tricks and I remember reading about the underline journey at medium (for inspiration).

@aashnajena and @Delawen any thoughts on this?

@AemieJ
Copy link
Contributor Author

AemieJ commented Aug 12, 2020

@zregvart alright I got your concern about it but with those changes, it looks messy in chrome browser, I found a method using background-image and linear-gradient on the CSS tricks site.

background-image: linear-gradient(to right, #583ac2 50%, transparent 50%);
background-position: 0 1.1em;
background-repeat: repeat-x;
background-size: 7px 1px;

If it's okay with you, I will implement it in this manner, it will create a neater effect of underline on each browser.
underline-link

use background image to created dotted effect
@zregvart
Copy link
Member

background-image: linear-gradient(to right, #583ac2 50%, transparent 50%);
background-position: 0 1.1em;
background-repeat: repeat-x;
background-size: 7px 1px;

Does the background-position track different font sizes correctly? Might be a bit of a headache to have this properly positioned for all font sizes.

@AemieJ
Copy link
Contributor Author

AemieJ commented Aug 14, 2020

@zregvart I have checked it, the background-position tracks all the font-size of the text and that of browsers correctly.

@zregvart zregvart merged commit f3d7110 into apache:master Aug 14, 2020
@zregvart
Copy link
Member

Thanks @AemieJ

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.

None yet

2 participants