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

Vivre: move link pseudo states to theme.json #6150

Merged
merged 5 commits into from
Jul 12, 2022
Merged

Conversation

madhusudhand
Copy link
Contributor

@madhusudhand madhusudhand commented Jun 30, 2022

Changes proposed in this Pull Request:

Moved css to theme.json for :hover, :focus and :active states. There are few style left in css because the style properties aren't supported in theme.json. ex: text-underline-offset

Related issue(s):

#6108

@madhusudhand madhusudhand added Do NOT merge! [Theme] Vivre Automatically generated label for Vivre. labels Jun 30, 2022
@madhusudhand madhusudhand self-assigned this Jun 30, 2022
@madhusudhand madhusudhand changed the title Curator: add link hover and active states to theme.json Curator: move link pseudo states to theme.json Jul 1, 2022
@pbking
Copy link
Contributor

pbking commented Jul 6, 2022

This is interesting and gave me a little pause. In this instance we are trading a little CSS for a lot of theme.json configuration. I don't think there's another way to do it, and I don't think it's wrong, but it's interesting to see how much less verbose CSS can be.

We did seem to lose something in translation with the post title links:

Before:
image

After:
image

And the read more link:

Before:
image

After:
image

If there are other differences they have escaped me.

@madhusudhand
Copy link
Contributor Author

Fixed both issues. Seems like they lost in the transition.
Even though line thickness is set in css, with single value set to text-decoration, thickness is lost.
changing textDecoration: underline to textDecoration: underline 0.25rem works.

@jeffikus jeffikus changed the title Curator: move link pseudo states to theme.json Vivre: move link pseudo states to theme.json Jul 8, 2022
@madhusudhand madhusudhand requested a review from jffng July 11, 2022 08:25
@jffng jffng force-pushed the curator-link-hover branch from 0934b00 to 2b787d7 Compare July 11, 2022 17:05
Copy link
Contributor

@jffng jffng left a comment

Choose a reason for hiding this comment

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

Thanks @madhusudhand this is looking good and very cool to see the pseudo states API in action.

In addition to rebasing, I made one change so the links match the design: 2b787d7

Based on the figma, it looks like text links are underlined by default and not underlined on hover:

Screen Shot 2022-07-11 at 1 08 19 PM

Let me know if the way I implemented it makes sense.

@pbking
Copy link
Contributor

pbking commented Jul 11, 2022

Previous comment deleted because I have no idea what I'm doing today.

This looks great. 👍

@jffng jffng merged commit d7d6fbb into trunk Jul 12, 2022
@jffng jffng deleted the curator-link-hover branch July 12, 2022 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Theme] Vivre Automatically generated label for Vivre.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants