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

feat(links): secondary link class #63

Merged
merged 2 commits into from
Dec 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ download:

cdn:
Copy link
Author

Choose a reason for hiding this comment

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

should we git ignore this file? is it autogenerated?

Copy link
Contributor

Choose a reason for hiding this comment

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

As y'all chatted about in Chapter meeting, this is a part of the Bootstrap build process. Technically this file has important configuration details in it and shouldn't be ignored. The changes to this file are done via The build script to hash the files (some of which we don't need). All that to say... For now I'd just leave it as modified because it doesn't hurt anything.

I'm excited about y'all investigating better improvements for this project. 😄

# See https://www.srihash.org for info on how to generate the hashes
css: 'sha384-XmV09HeMWS8ad0yhlWR7dQU3K4VGk7/ExmMILF+7FCxiD77qwa2Wsv3REXBHD35l'
css: 'sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN'
css_hash: sha384-hnvsmW4CEqIE9xpwdmvw+oyi2zalIdkqZJKT8ovyObj2fiPNSLt7xdsda4JGUfSf
js: 'sha384-XmV09HeMWS8ad0yhlWR7dQU3K4VGk7/ExmMILF+7FCxiD77qwa2Wsv3REXBHD35l'
js: 'sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN'
js_hash: sha384-1RkA5wjfeG5u+6ycZ90q+PMlafLBaMCHvGk6PlVrQmIuTvpdA9qupxwbnPf9QbHH
js_bundle: >-
https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.bundle.min.js
js_bundle_hash: sha384-gEp0IQktG6BLXHMpPT1pxMSC8EKUA159uPI9c/AmIhedq/EvAEfBroQ5tsSOS1/A
jquery: 'sha384-XmV09HeMWS8ad0yhlWR7dQU3K4VGk7/ExmMILF+7FCxiD77qwa2Wsv3REXBHD35l'
jquery: 'sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN'
jquery_hash: sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n
popper: 'sha384-XmV09HeMWS8ad0yhlWR7dQU3K4VGk7/ExmMILF+7FCxiD77qwa2Wsv3REXBHD35l'
popper: 'sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN'
popper_hash: sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN

toc:
Expand Down
3 changes: 3 additions & 0 deletions scss/_links.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.link-secondary {
color: $link-color-secondary;
}
2 changes: 2 additions & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ $link-hover-decoration: underline !default;
// Darken percentage for links with `.text-*` class (e.g. `.text-success`)
$emphasized-link-hover-darken-percentage: 15% !default;

Copy link
Author

Choose a reason for hiding this comment

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

should these vars go here or in the new _links.scss file

Choose a reason for hiding this comment

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

Hmm, that's a good question, and one I'm not sure of the answer to. Not sure what is considered "best practice" for that. I assume all vars should live in the _variables file. 🤷‍♂️

Copy link
Author

Choose a reason for hiding this comment

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

will keep it there for now, we have other vars we've added to this file. but when we upgrade we will have to resolve conflicts in this file. i think best practice is to have an override.scss

$dark-blue: #0028A8 !default;
$link-color-secondary: $dark-blue;
// Paragraphs
//
// Style p element.
Expand Down
1 change: 1 addition & 0 deletions scss/bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@
@import "print";
@import "sprite";
@import "video-tile";
@import "links";
1 change: 1 addition & 0 deletions site/_data/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- title: Icons
- title: Input group
- title: Jumbotron
- title: Links
- title: List group
- title: Logos
- title: Media object
Expand Down
24 changes: 24 additions & 0 deletions site/docs/components/links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
layout: docs
title: Links
description: Anchor tags
group: components
---
This component does not exist in bootstrap by defeault. We could have overidden `text-secondary` in `Colors` but that would have affected all the components that use `text-secondary`, like `Buttons`.


## Examples

By default, a href tags are the primary theme color.

{% capture example %}
<a href="#">Default link</a>
{% endcapture %}
{% include example.html content=example %}

Secondary links are anchor tags that have a secondary call to action.

{% capture example %}
<a href="#" class="link-secondary">Secondary link</a>
{% endcapture %}
{% include example.html content=example %}
3 changes: 3 additions & 0 deletions site/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -312,4 +312,7 @@
<url>
<loc>https://flo-scss.flo.center/docs/utilities/z-index/</loc>
</url>
<url>
<loc>https://flo-scss.flo.center/docs/components/links/</loc>
</url>
</urlset>