Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: third_party/polymer/components-chromium/core-tooltip/core-tooltip.html

Issue 1215543002: Remove Polymer 0.5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!--
2 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
3 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
4 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
5 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
6 Code distributed by Google as part of the polymer project is also
7 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
8 --><!--
9 The `core-tooltip` element creates a hover tooltip centered for the content
10 it contains. It can be positioned on the top|bottom|left|right of content using
11 the `position` attribute.
12
13 To include HTML in the tooltip, include the `tip` attribute on the relevant
14 content.
15
16 <b>Example</b>:
17
18 <core-tooltip label="I'm a tooltip">
19 <span>Hover over me.</span>
20 </core-tooltip>
21
22 <b>Example</b> - positioning the tooltip to the right:
23
24 <core-tooltip label="I'm a tooltip to the right" position="right">
25 <core-icon-button icon="drawer"></core-icon-button>
26 </core-tooltip>
27
28 <b>Example</b> - no arrow and showing by default:
29
30 <core-tooltip label="Tooltip with no arrow and always on" noarrow show>
31 <img src="image.jpg">
32 </core-tooltip>
33
34 <b>Example</b> - disable the tooltip.
35
36 <core-tooltip label="Disabled label never shows" disabled>
37 ...
38 </core-tooltip>
39
40 <b>Example</b> - rich tooltip using the `tip` attribute:
41
42 <core-tooltip>
43 <div>Example of a rich information tooltip</div>
44 <div tip>
45 <img src="profile.jpg">Foo <b>Bar</b> - <a href="#">@baz</a>
46 </div>
47 </core-tooltip>
48
49 By default, the `tip` attribute specifies the HTML content for a rich tooltip.
50 You can customize this attribute with the `tipAttribute` attribute:
51
52 <core-tooltip tipAttribute="htmltooltip">
53 <div>Example of a rich information tooltip</div>
54 <div htmltooltip>
55 ...
56 </div>
57 </core-tooltip>
58
59 @group Polymer Core Elements
60 @element core-tooltip
61 @extends core-focusable
62 @mixins Polymer.CoreFocusable
63 @homepage http://www.polymer-project.org/components/core-tooltip/index.html
64 --><html><head><link rel="import" href="../polymer/polymer.html">
65 <link rel="import" href="../core-focusable/core-focusable.html">
66 <link rel="import" href="../core-resizable/core-resizable.html">
67
68 <!-- TODO: would be nice to inherit from label to get .htmlFor, and .control,
69 but the latter is readonly. -->
70 <!-- TODO: support off center arrows. -->
71 <!-- TODO: detect mobile and apply the .large class, instead of manual
72 control. -->
73 <!-- TODO: possibly reuse core-overlay. -->
74 </head><body><polymer-element name="core-tooltip" attributes="noarrow position l abel show tipAttribute" role="tooltip" tabindex="0" assetpath="">
75 <template>
76
77 <link rel="stylesheet" href="core-tooltip.css">
78 <div id="tooltip" hidden?="{{!hasTooltipContent}}" class="core-tooltip {{posit ion}} {{ {noarrow: noarrow, show: show &amp;&amp; !disabled} | tokenList}}">
79 <content id="c" select="[{{tipAttribute}}]">{{label}}</content>
80 </div>
81
82 <content></content>
83
84 </template>
85
86 </polymer-element>
87 <script charset="utf-8" src="core-tooltip-extracted.js"></script></body></html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698