8000 Add a template for the new link component by msayoung · Pull Request #220 · localgovdrupal/localgov_base · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 6 commits into from
Jun 22, 2022
Merged

Conversation

msayoung
Copy link
Member

No description provided.

@msayoung msayoung requested a review from markconroy June 14, 2022 16:27
@finnlewis
Copy link
Member

@markconroy another one that @msayoung would like your eyes on before merging. :)

Comment on lines 4 to 9
margin-bottom: var(--vertical-rhythm-spacing);
}

.link-block__title-icon {
flex-shrink: 0;
margin-right: var(--spacing-smaller);
Copy link
Member

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

Copy link
Member Author

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

Copy link
Member

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?

Comment on lines 2 to 6
margin-bottom: 1.5rem;
}

.link-block__title-icon {
margin-right: 0.5rem;
Copy link
Member

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',
Copy link
Member

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.

Copy link
Member Author

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 :)

Copy link
Member

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 @@
{#
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

gone

@msayoung msayoung requested a review from markconroy June 20, 2022 16:11
@markconroy markconroy merged commit 661e1d3 into 1.x Jun 22, 2022
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.

3 participants
0