Skip to content
This repository was archived by the owner on Jan 31, 2018. It is now read-only.

Change link underline technique to linear-gradient#27

Open
Scotchester wants to merge 6 commits into
cfpb:gh-pagesfrom
Scotchester:underlines
Open

Change link underline technique to linear-gradient#27
Scotchester wants to merge 6 commits into
cfpb:gh-pagesfrom
Scotchester:underlines

Conversation

@Scotchester

Copy link
Copy Markdown
Contributor

If I did this right, @himedlooff, all you should need to do is pull this down, re-run npm install and grunt vendor, and rebuild the docs.

Let me know how it goes.

Comment thread src/cf-base.less Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You've got a "To be documented" note here. Can you add that documentation please?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Converted to .u- mixin and moved to cf-utilities.less.

@himedlooff

Copy link
Copy Markdown
Contributor

We should offer a way to break the underlines without having to use a mixin. Like maybe .u-breaking-underlines as a utility class.

Also the demo doesn't seem to be working right. The first link looks ok but the rest don't appear to have the breaking underline, or it's very hard to tell.

The "Breaking link underlines mixin" demo

image

image

@Scotchester

Copy link
Copy Markdown
Contributor Author

I considered doing that. The prospect of changing background colors worries me slightly, but it probably makes sense to have a utility class with a default of white. Perhaps including white in the name would be good for awareness.

Hmm, yeah. The breaking effect is not as good as I thought, either. It's working, just not well enough for some letters. Maybe a difference in browser rendering. What are these screenshots from?

@himedlooff

Copy link
Copy Markdown
Contributor

Chrome

@Scotchester

Copy link
Copy Markdown
Contributor Author

Let's roll with it as-is for now, since it's not the core purpose of this change. In the near future, I'll investigate possible optimizations to the breaking technique, starting with this excellent article: https://eager.io/blog/smarter-link-underlines/

@himedlooff

Copy link
Copy Markdown
Contributor

I'd like for the breaking underlines to be more than a mixin though. That should be easy to add right?

@Scotchester

Copy link
Copy Markdown
Contributor Author

Sure, I'll add that. .u-break-underlines-on-white?

@himedlooff

Copy link
Copy Markdown
Contributor

I think .u-break-underlines is sufficient.

@Scotchester

Copy link
Copy Markdown
Contributor Author

Updated.

@himedlooff

Copy link
Copy Markdown
Contributor

Thanks. Let's merge after the Design Manual meet up tomorrow.

@himedlooff

Copy link
Copy Markdown
Contributor

Status: waiting for others to play around with the demo as stated here: cfpb/design-manual#244

- Breaking underlines now interact better with serifed descenders
- Text shadow removed when selecting text that includes links
- Link color darkened by 10% when selecting text that includes links
@anselmbradford

Copy link
Copy Markdown
Member

Ping!

@Scotchester

Copy link
Copy Markdown
Contributor Author

Sorry, this is a really far-reaching change. I think it's on hold until we get all the DM surge work out the door. Then we can buckle down and address all of the places that this change will affect.

@jimmynotjim

Copy link
Copy Markdown
Contributor

Should we close it and start over? Things have changed quite a bit in this time

@Scotchester

Copy link
Copy Markdown
Contributor Author

Not so much has changed in cf-core that this PR isn't still useful. I still have an underlines branch locally that I'm working with.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants