Skip to content

Instantly share code, notes, and snippets.

@briansage
Last active December 22, 2015 20:49
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 briansage/6529309 to your computer and use it in GitHub Desktop.
Save briansage/6529309 to your computer and use it in GitHub Desktop.
Pattern for B/A tests that show/hide two sets of existing content. Switch the body className bv-inactive to bv-active to switch between test versions.
%body.bv-inactive
.test-container-a.bv-active-hidden
.stuff
.test-container-b.bv-inactive-hidden
.different-stuff
.test-container-a.bv-active-hidden
.more-different-stuff
.test-container-b.bv-inactive-hidden
.same-stuff
%style{type: "text/css"}
:scss
.bv-inactive .bv-inactive-hidden {
display: none;
}
.bv-active .bv-active-hidden {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment