Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lizkaraffa
Last active May 15, 2019 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lizkaraffa/fdab4b9ca1e2f350c3ee488f11800d85 to your computer and use it in GitHub Desktop.
Save lizkaraffa/fdab4b9ca1e2f350c3ee488f11800d85 to your computer and use it in GitHub Desktop.
Travel Time Markup
<section class="tp-travel-time tp-block">
<div class="tp-block__container--full">
<h4 class="tp-travel-time__title">Travel Time to Next Destination</h4>
<div class="tp-travel-time__meta">
<span class="tp-travel-time__bike"><span class="tp-svg-icon"></span><span class="tp-travel-time__content">20 minutes by bike</span></span>
<span class="tp-travel-time__transit"><span class="tp-svg-icon"></span><span class="tp-travel-time__content">14 mintues by <a href="#">transit</a></span></span>
</div>
</div>
</section>
@jondcampbell
Copy link

If I have to put a wrapper around the labels, would something like this be okay:

<section class="tp-travel-time tp-block">
	<div class="tp-block__container--full">
		<h4 class="tp-travel-time__title">Travel Time to Next Destination</h4>
		<div class="tp-travel-time__meta">
			<span class="tp-travel-time__bike"><div class="tp-svg-icon"></div><span class="tp-travel-time__label">20 minutes by bike</span></span>
			<span class="tp-travel-time__transit"><div class="tp-svg-icon"></div><span class="tp-travel-time__label">14 mintues by <a href="#">transit</a></span></span>
		</div>
	</div>
</section>

The reason would be that the block attribute for the label I think needs a clear element to select for getting/setting the value. Using tp-travel-time__bike would not work because we have the svg icon div within it.

@lizkaraffa
Copy link
Author

@jon that makes perfect sense. Yes!

@lizkaraffa
Copy link
Author

Gist updated with wrapper around text span for icon instead of div.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment