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

424 default link style #427

Merged
merged 46 commits into from
Jun 11, 2019
Merged

424 default link style #427

merged 46 commits into from
Jun 11, 2019

Conversation

JBCSU
Copy link
Collaborator

@JBCSU JBCSU commented Jun 10, 2019

READY FOR REVIEW

Summary

Update the default styling for links. See #424.

Needed By (Date)

Other link work in Decanterpalooza will build on this, so sooner is better than later.

Urgency

Other link work in Decanterpalooza will build on this

Steps to Test

  1. Pull the branch
  2. Rebuild the assets and the styleguide
  3. Review the link styles.

Note that most of the diffs in this PR are because it's based on the 386-nav-color-map branch. I've changed the following files

  • scss/components/alert/_alert.scss
  • scss/utilities/functions/color.scss
  • scss/utilities/mixins/button/_button-secondary.scss
  • scss/utilities/mixins/link/_link.scss
  • scss/utilities/placeholders/components/_cta.scss
  • scss/utilities/variables/core/_core-color-maps.scss
  • templates/components/link/link.json
  • kss/builder/decanter/scss/_base_elements.scss

Affected Projects or Products

Associated Issues and/or People

See Also

yvonnetangsu and others added 29 commits May 28, 2019 14:53
…d alerts to use color map and function; start refactoring main nav colors
…ound color is now white; beginning color map refactoring
@yvonnetangsu
Copy link
Member

@JBCSU @yvonnetangsu given that we've effected so many other components (which I imagine may have been one of John's reasons for going with the Regular and non-underlined style to begin with), should we revert back, and add in a "default inline link" style, and let the default "body" style be as previously designed.
I like this because...
It does not force us to undo the Semi-bold and Underline across infinite numbers of links on our sites, which we would inevitably be forced to do. Lots of lines of code we could avoid.
A nice simple default "body" style seems good to me. Regular weight and no underline.

I agree with @kerri-augenstein. Could we revert the default link font-weight and have another variant for link within paragraph or something? :)

  1. I'm not sure how we would apply a "default inline link" style variant. I certainly don't think we want to require users to add a special class to every link they put anywhere in there content. But if they apply the class to a larger container, e.g <body>, <main>, <article>, then our other components would end up inheriting the styling anyway.
  2. More generally, our components are opinionated about how they look - we have a particular look we want to enforce. I think it's appropriate to be explicit about the styling of links in our components. Suppose a user decides they want their links to be bold even if Decanter's default link style doesn't include the font-weight. Then all our components would inherit that anyway.

We only have 14 components, and most of them work ok already. It's only a few components that need special attention. I'll just go ahead and be explicit about the link styling in those components.

That's a good point, @JBCSU

JBCSU added 2 commits June 11, 2019 12:25
* 386-nav-color-map:
  Change @warn to @error in function @color
  Namespace color map variable
  Fix styleguide comments
  Move PR template (#416)
@JBCSU
Copy link
Collaborator Author

JBCSU commented Jun 11, 2019

Ok, I think I've fixed all the cascades. Can someone with a keener eye for fonts than I double check, please? @yvonnetangsu

@yvonnetangsu
Copy link
Member

Ok, I think I've fixed all the cascades. Can someone with a keener eye for fonts than I double check, please? @yvonnetangsu

Font weight looks good, @JBCSU , but what happens to the underline? I thought we're adding underline to the default link style but I could be wrong 🤔 . Also, I believe the links in alerts have underlines to begin with.

@yvonnetangsu
Copy link
Member

yvonnetangsu commented Jun 11, 2019

One more thing, the :focus state of the default link needs to be changed to black color also (should match the :hover state when keyboard user tab to it). And the animation - those apply to the :focus as well.

@JBCSU
Copy link
Collaborator Author

JBCSU commented Jun 11, 2019

Ok, I think I've fixed all the cascades. Can someone with a keener eye for fonts than I double check, please? @yvonnetangsu

Font weight looks good, @JBCSU , but what happens to the underline? I thought we're adding underline to the default link style but I could be wrong 🤔 . Also, I believe the links in alerts have underlines to begin with.

The new default link style does have underline. I therefore removed the specification from links inline in alert text and allow those links to inherit the default style, as I believe those links should actually get the default inline link style (i.e. if a developer overrides the default inline styles).

@JBCSU
Copy link
Collaborator Author

JBCSU commented Jun 11, 2019

One more thing, the :focus state of the default link needs to be changed to black color also (should match the :hover state when keyboard user tab to it). And the animation - those apply to the :focus as well.

:focus was not in the css before, but I can add it.

Animation is not part of the default inline link style, which is this PR. If we need to address animation, I propose we do it in #341.

@yvonnetangsu
Copy link
Member

Ok, I think I've fixed all the cascades. Can someone with a keener eye for fonts than I double check, please? @yvonnetangsu

Font weight looks good, @JBCSU , but what happens to the underline? I thought we're adding underline to the default link style but I could be wrong 🤔 . Also, I believe the links in alerts have underlines to begin with.

The new default link style does have underline. I therefore removed the specification from links inline in alert text and allow those links to inherit the default style, as I believe those links should actually get the default inline link style (i.e. if a developer overrides the default inline styles).

Great - yeah, turns out I had to rebuild the styleguide. Looks good to me.

@yvonnetangsu
Copy link
Member

One more thing, the :focus state of the default link needs to be changed to black color also (should match the :hover state when keyboard user tab to it). And the animation - those apply to the :focus as well.

:focus was not in the css before, but I can add it.

Animation is not part of the default inline link style, which is this PR. If we need to address animation, I propose we do it in #341.

Interesting....I didn't realize the current live site doesn't have focus styles for the links. I must be thinking about the homesite (the jump links have animation when you tab to them). We could merge this in, and I can deal with the focus state in the animation branch later?

@yvonnetangsu
Copy link
Member

One probably final thing, JB - the "Decanter" logo now has underline and the font weight is different. Could you please remove the underline and change it to font-weight: 700?

JBCSU added 2 commits June 11, 2019 14:24
move all alert colors into the $alert-colors map;
change button-big to use button-primary and just make overrides
@JBCSU
Copy link
Collaborator Author

JBCSU commented Jun 11, 2019

I did go ahead and :focus states, and fixed all the cascades' :focus states. And I fixed the link in the masthead. Anything else, @yvonnetangsu? Thanks for your very careful eye!

Merge branch 'master' into 424-inline-link-style

* master:
  Set up color maps for Decanter and refactor main nav colors to refer to color maps (#420)

# Conflicts: - all resolved using "mine"
#	core/dist/css/decanter.css
#	core/src/scss/components/global-footer/_global-footer.scss
#	core/src/scss/utilities/functions/_color.scss
#	core/src/scss/utilities/mixins/button/_button-big.scss
#	core/src/scss/utilities/mixins/button/_button-primary.scss
#	core/src/scss/utilities/mixins/button/_button-secondary.scss
#	core/src/scss/utilities/mixins/link/_link.scss
#	core/src/scss/utilities/variables/core/_core-color-maps.scss
Copy link
Member

@yvonnetangsu yvonnetangsu left a comment

Choose a reason for hiding this comment

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

I suggest we change the .su-alert--warning link color to $color-dark-red or $color-cardinal-red, and hover link color to $color-black. The blue is more similar in value (brightness) to the yellow background compared to red. So changing this to red would increase the contrast.

@yvonnetangsu
Copy link
Member

GTG for me! The Decanter logo hover color - I can live with either.

Copy link
Member

@yvonnetangsu yvonnetangsu left a comment

Choose a reason for hiding this comment

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

Looks great - thanks for updating the color map and adding the focus states! 👍

Copy link
Member

@sherakama sherakama left a comment

Choose a reason for hiding this comment

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

Thanks for all your attention on this detailed item. GTG.

@JBCSU
Copy link
Collaborator Author

JBCSU commented Jun 11, 2019

Great, thanks @yvonnetangsu & @sherakama. Merging now.

@JBCSU JBCSU merged commit 80133c4 into master Jun 11, 2019
@JBCSU JBCSU deleted the 424-inline-link-style branch June 11, 2019 22:45
yvonnetangsu added a commit that referenced this pull request Jun 12, 2019
* master:
  424 default link style (#427)
  Update package.json (#438)
  Set up color maps for Decanter and refactor main nav colors to refer to color maps (#420)
yvonnetangsu added a commit that referenced this pull request Jun 12, 2019
* master:
  Use svg icons as "mask" so their colors could be changed using CSS background-color (#426)
  424 default link style (#427)
  Update package.json (#438)
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.

4 participants