Skip to content

feat(): Introduce list steps #80

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 7 commits into from
Oct 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 13 additions & 0 deletions src/_includes/components/list-steps.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="list-steps__item">
<span class="list-steps__number">{{ include.number }}</span>
{% if include.heading == %}
<div class="list-steps__content list-steps__content--align">
{{ include.content }}
</div>
{% else %}
<h5 class="list-steps__title">{{ include.heading }}</h5>
<div class="list-steps__content">
{{ include.content }}
</div>
{% endif %}
</div>
41 changes: 41 additions & 0 deletions src/_sass/components/_list-steps.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.list-steps {
&__item {
list-style-type: none;
position: relative;
}

&__number {
width: 24px;
height: 24px;
border-radius: 50%;
background-color: color(primary);
font-size: 16px;
font-weight: 600;
line-height: 1.5;
color: color(white);
display: block;
text-align: center;
position: absolute;
top: 0;
left: 0;
}

&__title {
margin-left: 40px;

@include breakpoint(medium up) {
font-size: 20px;
}
}

&__content {
line-height: 1.73;
color: color(secondary-dark);
margin-top: 10px;

&--align {
margin-left: 40px;
margin-top: 0;
}
}
}
1 change: 1 addition & 0 deletions src/_sass/segment.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
@import "components/button-link";
@import "components/alert";
@import "components/markdown";
@import "components/list-steps";

// Pages
// =================================================
Expand Down
4 changes: 4 additions & 0 deletions src/styleguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ layout: page
{% include components/alert.html type="success" content="This is my sample note." %}
{% include components/alert.html type="warning" content="This is my sample note." %}
{% include components/alert.html type="error" content="This is my sample note." %}

{% include components/list-steps.html number="1" heading="Totally new here?" content="Not sure what to track or why? Check out Segment’s Analytics Academy to learn more about the wide world of analytics, including the what and why and some stories about beautiful stacks." %}
{% include components/list-steps.html number="2" heading="Totally new here?" content="Not sure what to track or why? Check out Segment’s Analytics Academy to learn more about the wide world of analytics, including the what and why and some stories about beautiful stacks." %}
{% include components/list-steps.html number="3" heading="Totally new here?" content="Not sure what to track or why? Check out Segment’s Analytics Academy to learn more about the wide world of analytics, including the what and why and some stories about beautiful stacks." %}