-
Notifications
You must be signed in to change notification settings - Fork 1
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
TWE-19 | FE | Links columns block #345
Merged
shyusu4
merged 3 commits into
feature/twe-19-just-links-block
from
feature/19-just-links-block-FE
Jan 21, 2025
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
20 changes: 10 additions & 10 deletions
20
...roject_styleguide/templates/patterns/molecules/streamfield/blocks/link_columns_block.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
@use 'config' as *; | ||
|
||
.link-columns { | ||
&__header { | ||
margin-bottom: $spacer-half; | ||
} | ||
|
||
&__links { | ||
display: grid; | ||
grid-template-columns: 1fr; | ||
column-gap: $spacer-half; | ||
|
||
@include media-query(medium) { | ||
grid-template-columns: repeat(2, 1fr); | ||
} | ||
|
||
@include media-query(large) { | ||
grid-template-columns: repeat(3, 1fr); | ||
} | ||
} | ||
|
||
&__item { | ||
padding: $spacer-mini-plus 0; | ||
border-top: 1px solid var(--color--border); | ||
} | ||
|
||
&__link { | ||
@include font-size(size-six); | ||
color: var(--color--white); | ||
|
||
&:hover { | ||
transition: color $transition-quick; | ||
color: var(--color--theme-primary); | ||
|
||
@include reduced-motion() { | ||
transition: none; | ||
} | ||
} | ||
|
||
@include high-contrast-mode() { | ||
text-decoration: underline; | ||
} | ||
} | ||
|
||
&__tail { | ||
// Keep the arrow attached to the last word so it's not orphaned on a new line | ||
white-space: nowrap; | ||
display: inline; | ||
} | ||
|
||
&__arrow { | ||
@include arrow-link-icon-styles( | ||
$width: 18px, | ||
$interaction-color: var(--color--theme-primary) | ||
); | ||
color: var(--color--theme-primary); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,13 +185,15 @@ | |
@mixin arrow-link-icon-styles( | ||
$mobile-hidden: false, | ||
$color: var(--color--decoration), | ||
$interaction-color: var(--color--link-interaction) | ||
$interaction-color: var(--color--link-interaction), | ||
$width: 72px, | ||
$height: 22px | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice little enhancement : ) |
||
) { | ||
// Apply all common styles regardless of mobile-hidden | ||
display: inline-block; | ||
color: $color; | ||
width: 72px; | ||
height: 22px; | ||
width: $width; | ||
height: $height; | ||
transition: transform, $transition-quick; | ||
|
||
@include reduced-motion() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see in the design that the links don't include underlines which goes against the rest of the site where we've included links - it might be worth mentioning this to Ben E to see if he'd be up for adding underlines.
If not we should add them back in when viewing in high contrast mode - there's a mixin you can use here: https://github.com/torchbox/torchbox.com/blob/main/tbx/static_src/sass/config/_mixins.scss#L243
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @chris-lawton thanks for flagging- I've asked Ben and he's mentioned that the underlines combined with the borders in between the links don't look the best and the arrows should indicate that these are links, so I've only added them in high contrast mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @shyusu4 having links on underlines is something we've kept really consistent throughout the site, so although I don't have all the context, I'd be reluctant to make an exception here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @helenb, we've spoken to Ben about reconsidering this - will be updating this to include the underlines for links so it's consistent everywhere