Skip to content

Instantly share code, notes, and snippets.

@stefbowerman
Last active January 12, 2018 20:40
Show Gist options
  • Select an option

  • Save stefbowerman/bfbae945d1129f351304fd418baeb1f0 to your computer and use it in GitHub Desktop.

Select an option

Save stefbowerman/bfbae945d1129f351304fd418baeb1f0 to your computer and use it in GitHub Desktop.
@stefbowerman
Copy link
Copy Markdown
Author

stefbowerman commented Jan 12, 2018

To use swatch alt text instead of filenaming

Change this line

{% assign swatch_src_identifier = 'swt--' %}

to

{% assign swatch_alt_identifier = 'swatch' %}

and then change this line

{% unless image.src contains swatch_src_identifier %}

to

{% unless downcase_alt contains swatch_alt_identifier %}

and then make sure to update the product-swatches.liquid snippet to also use alt tags instead of filenames

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