[Pkg-javascript-commits] [d3-tip.js] 203/277: moved the arrow styles to separate css file to stop copy/pasting and provide useful defaults

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

bhuvan-guest pushed a commit to branch master
in repository d3-tip.js.

commit 0d3c40cb492840950f98c77bc0f18c407efbd5c8
Author: Dean Malmgren <dean.malmgren at datascopeanalytics.com>
Date:   Sat Dec 7 05:48:34 2013 -0600

    moved the arrow styles to separate css file to stop copy/pasting and provide useful defaults
---
 ...styling-and-modifying-tooltips.md => d3-tip.css | 19 --------
 docs/styling-and-modifying-tooltips.md             | 57 +---------------------
 examples/arrow-styles.html                         | 55 +--------------------
 3 files changed, 2 insertions(+), 129 deletions(-)

diff --git a/docs/styling-and-modifying-tooltips.md b/d3-tip.css
similarity index 58%
copy from docs/styling-and-modifying-tooltips.md
copy to d3-tip.css
index 74fdb1c..42adb95 100644
--- a/docs/styling-and-modifying-tooltips.md
+++ b/d3-tip.css
@@ -1,17 +1,3 @@
-[API Documentation](index.md) ➤ Styling and modifying tooltips
-
-# Styling and modifying tooltips
-Tooltips make no assumption about how they will be styled.  Any style is left up
-to the user.
-
-### tip.style
-A proxy to d3's [selection.style](https://github.com/mbostock/d3/wiki/Selections#wiki-style).
-
-### tip.attr
-A proxy to d3's [selection.attr](https://github.com/mbostock/d3/wiki/Selections#wiki-attr).
-
-### Example Styles
-``` css
 .d3-tip {
   line-height: 1;
   font-weight: bold;
@@ -65,8 +51,3 @@ A proxy to d3's [selection.attr](https://github.com/mbostock/d3/wiki/Selections#
   top: 50%;
   left: 100%;
 }
-```
-
-See these stylings in action in either
-[a live example](http://bl.ocks.org/deanmalmgren/6638585) or the
-[examples directory](../examples/arrow-styles.html).
diff --git a/docs/styling-and-modifying-tooltips.md b/docs/styling-and-modifying-tooltips.md
index 74fdb1c..4d07c22 100644
--- a/docs/styling-and-modifying-tooltips.md
+++ b/docs/styling-and-modifying-tooltips.md
@@ -1,4 +1,4 @@
-[API Documentation](index.md) ➤ Styling and modifying tooltips
+[API Documentation](index.md) Styling and modifying tooltips
 
 # Styling and modifying tooltips
 Tooltips make no assumption about how they will be styled.  Any style is left up
@@ -11,61 +11,6 @@ A proxy to d3's [selection.style](https://github.com/mbostock/d3/wiki/Selections
 A proxy to d3's [selection.attr](https://github.com/mbostock/d3/wiki/Selections#wiki-attr).
 
 ### Example Styles
-``` css
-.d3-tip {
-  line-height: 1;
-  font-weight: bold;
-  padding: 12px;
-  background: rgba(0, 0, 0, 0.8);
-  color: #fff;
-  border-radius: 2px;
-}
-
-/* Creates a small triangle extender for the tooltip */
-.d3-tip:after {
-  box-sizing: border-box;
-  display: inline;
-  font-size: 10px;
-  width: 100%;
-  line-height: 1;
-  color: rgba(0, 0, 0, 0.8);
-  position: absolute;
-}
-
-/* Nrthward tooltips */
-.d3-tip.n:after {
-  content: "\25BC";
-  margin: -1px 0 0 0;
-  top: 100%;
-  left: 0;
-  text-align: center;
-}
-
-/* Eastward tooltips */
-.d3-tip.e:after {
-  content: "\25C0";
-  margin: -4px 0 0 0;
-  top: 50%;
-  left: -8px;
-}
-
-/* Southward tooltips */
-.d3-tip.s:after {
-  content: "\25B2";
-  margin: 0 0 1px 0;
-  top: -8px;
-  left: 0;
-  text-align: center;
-}
-
-/* Westward tooltips */
-.d3-tip.w:after {
-  content: "\25B6";
-  margin: -4px 0 0 -1px;
-  top: 50%;
-  left: 100%;
-}
-```
 
 See these stylings in action in either
 [a live example](http://bl.ocks.org/deanmalmgren/6638585) or the
diff --git a/examples/arrow-styles.html b/examples/arrow-styles.html
index e0fe4ad..8175fb2 100644
--- a/examples/arrow-styles.html
+++ b/examples/arrow-styles.html
@@ -22,60 +22,6 @@
     margin-left: 200px;
   }
 
-  .d3-tip {
-    line-height: 1;
-    font-weight: bold;
-    padding: 12px;
-    background: rgba(0, 0, 0, 0.8);
-    color: #fff;
-    border-radius: 2px;
-  }
-
-  /* Creates a small triangle extender for the tooltip */
-  .d3-tip:after {
-    box-sizing: border-box;
-    display: inline;
-    font-size: 10px;
-    width: 100%;
-    line-height: 1;
-    color: rgba(0, 0, 0, 0.8);
-    position: absolute;
-  }
-
-  /* Nrthward tooltips */
-  .d3-tip.n:after {
-    content: "\25BC";
-    margin: -1px 0 0 0;
-    top: 100%;
-    left: 0;
-    text-align: center;
-  }
-
-  /* Eastward tooltips */
-  .d3-tip.e:after {
-    content: "\25C0";
-    margin: -4px 0 0 0;
-    top: 50%;
-    left: -8px;
-  }
-
-  /* Southward tooltips */
-  .d3-tip.s:after {
-    content: "\25B2";
-    margin: 0 0 1px 0;
-    top: -8px;
-    left: 0;
-    text-align: center;
-  }
-
-  /* Westward tooltips */
-  .d3-tip.w:after {
-    content: "\25B6";
-    margin: -4px 0 0 -1px;
-    top: 50%;
-    left: 100%;
-  }
-
   circle {
     fill: #ccc;
     fill-opacity: 0.6;
@@ -92,6 +38,7 @@
     text-anchor: middle;
   }
   </style>
+  <link rel="stylesheet" type="css" href="../d3-tip.css">
 </head>
 <body>
   <script type="text/javascript">

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/d3-tip.js.git



More information about the Pkg-javascript-commits mailing list