]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Visual Regression: Added image replacement (text-hide) to testing
authorharry <harmanmanchanda182@gmail.com>
Wed, 8 Feb 2017 17:59:01 +0000 (23:29 +0530)
committerharry <harmanmanchanda182@gmail.com>
Wed, 8 Feb 2017 17:59:01 +0000 (23:29 +0530)
Also updated docs for the same.

docs/pages/prototyping.md
test/visual/prototype/image-replacement.html [new file with mode: 0644]

index 83dbbad3e2b54c5964132e8c2d6273916edd5480..5cd88580c718232a3196632dae4de1ad4dec3d98 100644 (file)
@@ -379,9 +379,12 @@ These overflow classes helps you to clip content, render scrollbars or simply ju
 
 You might want to include a logo on the page but you also would like to use a text within a header tag for the sake of accessibility and also for gaining benifits from SEO, and ideally on the webpage you would like to show your logo and not text. In that scenario you can utilize this `.text-hide` class to replace an element’s text content with a background image, often logo.
 
-```html
-<h1 class="text-hide">Lorem ipsum dolor.</h1> 
-``` 
+```html_example
+<a href="" class="text-hide">
+  <img src="assets/img/logos/zurb-logo.svg">
+  Zurb <!-- Logo Text  -->
+</a>
+```
 
 ---
 
diff --git a/test/visual/prototype/image-replacement.html b/test/visual/prototype/image-replacement.html
new file mode 100644 (file)
index 0000000..ea37ad2
--- /dev/null
@@ -0,0 +1,26 @@
+<!doctype html>
+<!--[if IE 9]><html class="lt-ie10" lang="en" > <![endif]-->
+<html class="no-js" lang="en" dir="ltr">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>Foundation for Sites Testing</title>
+    <link href="../motion-ui/dist/motion-ui.css" rel="stylesheet" />
+    <link href="../assets/css/foundation-prototype.css" rel="stylesheet" />
+  </head>
+  <body>
+    <div class="row column">
+      <h2 class="m-t-40">Text Hide</h2>
+      <a href="" class="text-hide">
+        <img src="http://foundation.zurb.com/sites/docs/assets/img/logos/zurb-logo.svg">
+        Zurb
+      </a>
+    </div>
+
+    <script src="../assets/js/vendor.js"></script>
+    <script src="../assets/js/foundation.js"></script>
+    <script>
+      $(document).foundation();
+    </script>
+  </body>
+</html>