[Pkg-javascript-commits] [d3-tip.js] 113/277: firsti pass at styling docs

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:22 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 4051786ee30f4e1b89b0b585028fc02625892331
Author: Justin Palmer <justin at github.com>
Date:   Sun Apr 21 15:32:32 2013 -0700

    firsti pass at styling docs
---
 docs/positioning-tooltip.md            |  3 ++-
 docs/styling-and-modifying-tooltips.md | 42 +++++++++++++++++++++++++++++++++-
 2 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/docs/positioning-tooltip.md b/docs/positioning-tooltip.md
index d766b5c..7e74dcf 100644
--- a/docs/positioning-tooltip.md
+++ b/docs/positioning-tooltip.md
@@ -4,7 +4,8 @@
 
 ### tip.direction(direction)
 Sets the position of a tooltip relative to a target element.  `direction` can be
-`n`, `s`, `e` or `w`.
+`n`, `s`, `e` or `w`.  The direction will also automatically be included as a classname
+on the tooltip element which allows for different style hooks based on the direction.
 
 ``` javascript
 tip.direction('n') // Position the tooltip to the top of a target element
diff --git a/docs/styling-and-modifying-tooltips.md b/docs/styling-and-modifying-tooltips.md
index 80882ac..b38a93a 100644
--- a/docs/styling-and-modifying-tooltips.md
+++ b/docs/styling-and-modifying-tooltips.md
@@ -1,3 +1,43 @@
 [API Documentation](index.md) ➤ Styling and modifying tooltips
 
-# Styling and modifying tooltips
\ No newline at end of file
+# Styling and modifying tooltips
+Tooltips make no assumption about how they will be styled.  Any style is left up
+to the user.
+
+### 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);
+    content: "\25BC";
+    position: absolute;
+    text-align: center;
+  }
+
+  /* Style northward tooltips differently */
+  .d3-tip.n:after {
+    margin: -1px 0 0 0;
+    top: 100%;
+    left: 0;
+  }
+  ```
+
+  ### 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).
\ No newline at end of file

-- 
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