Last active
March 21, 2017 17:34
-
-
Save stevebosworth/7a2fa4b98cdc8ce6a6c1d1805a282e4c to your computer and use it in GitHub Desktop.
a11y-examples-sale-price
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
{% if product.compare_at_price > product.price %> | |
<span class=”visually-hidden”>Regular Price</span> | |
<span id=”ComparePrice”> $100</span> | |
<span class=”visually-hidden”>Sale price</span> | |
{% endif %} | |
<span id=”ProductPrice” itemprop=”price”>$50</span> | |
<style> | |
.visually-hidden { | |
position: absolute !important; | |
overflow: hidden; | |
clip: rect(0 0 0 0); | |
height: 1px; | |
width: 1px; | |
margin: -1px; | |
padding: 0; | |
border: 0; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment