-
Notifications
You must be signed in to change notification settings - Fork 20
Add a template for the new link component #220
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
Conversation
@markconroy another one that @msayoung would like your eyes on before merging. :) |
css/components/link.css
Outdated
margin-bottom: var(--vertical-rhythm-spacing); | ||
} | ||
|
||
.link-block__title-icon { | ||
flex-shrink: 0; | ||
margin-right: var(--spacing-smaller); |
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.
We should probably create variables for these margins, so it's easier for sub-themes to override them
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 realised we didn't need that margin-bottom anyway
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.
Should we create a variable for margin-right
here? Something like --link-title-icon-margin
?
css/components/link.ie11.css
Outdated
margin-bottom: 1.5rem; | ||
} | ||
|
||
.link-block__title-icon { | ||
margin-right: 0.5rem; |
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.
Let's use variables for these margins
<div class="link-block__title-wrapper"> | ||
{% include "@localgov_base/includes/icons/icon.html.twig" with { | ||
icon_name: title_icon, | ||
icon_wrapper_element: 'div', |
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 think div
is the "sensible default", so does not need to be included here as it is set automatically.
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.
do you mean the sensible default for the icon?
if so then this div is wrapping the icon and the text and flexing them. but I may have misunderstood :)
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 mean the div on line 64 icon_wrapper_element: 'div',
- the icon template uses div
by default, so you only need to put a value in there is you want to use span
or something elsse.
@@ -0,0 +1,80 @@ | |||
{# |
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.
Looks like this file is a duplicate
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.
gone
No description provided.