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

Side by Side Diff: third_party/polymer/v1_0/components-chromium/paper-tabs/README.md

Issue 1766433002: Roll Polymer to 1.3.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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
1 1
2 <!--- 2 <!---
3 3
4 This README is automatically generated from the comments in these files: 4 This README is automatically generated from the comments in these files:
5 paper-tab.html paper-tabs.html 5 paper-tab.html paper-tabs.html
6 6
7 Edit those files, and our readme bot will duplicate them over here! 7 Edit those files, and our readme bot will duplicate them over here!
8 Edit this file, and the bot will squash your changes :) 8 Edit this file, and the bot will squash your changes :)
9 9
10 The bot does some handling of markdown. Please file a bug if it does the wrong 10 The bot does some handling of markdown. Please file a bug if it does the wrong
11 thing! https://github.com/PolymerLabs/tedium/issues 11 thing! https://github.com/PolymerLabs/tedium/issues
12 12
13 --> 13 -->
14 14
15 [![Build Status](https://travis-ci.org/PolymerElements/paper-tabs.svg?branch=mas ter)](https://travis-ci.org/PolymerElements/paper-tabs) 15 [![Build status](https://travis-ci.org/PolymerElements/paper-tabs.svg?branch=mas ter)](https://travis-ci.org/PolymerElements/paper-tabs)
16 16
17 _[Demo and API Docs](https://elements.polymer-project.org/elements/paper-tabs)_ 17 _[Demo and API docs](https://elements.polymer-project.org/elements/paper-tabs)_
18 18
19 19
20 ##&lt;paper-tabs&gt; 20 ##&lt;paper-tabs&gt;
21 21
22 Material design: [Tabs](https://www.google.com/design/spec/components/tabs.html) 22 Material design: [Tabs](https://www.google.com/design/spec/components/tabs.html)
23 23
24 `paper-tabs` makes it easy to explore and switch between different views or func tional aspects of 24 `paper-tabs` makes it easy to explore and switch between different views or func tional aspects of
25 an app, or to browse categorized data sets. 25 an app, or to browse categorized data sets.
26 26
27 Use `selected` property to get or set the selected tab. 27 Use `selected` property to get or set the selected tab.
28 28
29 Example: 29 Example:
30 30
31 ```html 31 ```html
32 <paper-tabs selected="0"> 32 <paper-tabs selected="0">
33 <paper-tab>TAB 1</paper-tab> 33 <paper-tab>TAB 1</paper-tab>
34 <paper-tab>TAB 2</paper-tab> 34 <paper-tab>TAB 2</paper-tab>
35 <paper-tab>TAB 3</paper-tab> 35 <paper-tab>TAB 3</paper-tab>
36 </paper-tabs> 36 </paper-tabs>
37 ``` 37 ```
38 38
39 See <a href="#paper-tab">paper-tab</a> for more information about 39 See <a href="?active=paper-tab">paper-tab</a> for more information about
40 `paper-tab`. 40 `paper-tab`.
41 41
42 A common usage for `paper-tabs` is to use it along with `iron-pages` to switch 42 A common usage for `paper-tabs` is to use it along with `iron-pages` to switch
43 between different views. 43 between different views.
44 44
45 ```html 45 ```html
46 <paper-tabs selected="{{selected}}"> 46 <paper-tabs selected="{{selected}}">
47 <paper-tab>Tab 1</paper-tab> 47 <paper-tab>Tab 1</paper-tab>
48 <paper-tab>Tab 2</paper-tab> 48 <paper-tab>Tab 2</paper-tab>
49 <paper-tab>Tab 3</paper-tab> 49 <paper-tab>Tab 3</paper-tab>
50 </paper-tabs> 50 </paper-tabs>
51 51
52 <iron-pages selected="{{selected}}"> 52 <iron-pages selected="{{selected}}">
53 <div>Page 1</div> 53 <div>Page 1</div>
54 <div>Page 2</div> 54 <div>Page 2</div>
55 <div>Page 3</div> 55 <div>Page 3</div>
56 </iron-pages> 56 </iron-pages>
57 ``` 57 ```
58 58
59 To use links in tabs, add `link` attribute to `paper-tab` and put an `<a>` 59 To use links in tabs, add `link` attribute to `paper-tab` and put an `<a>`
60 element in `paper-tab`. 60 element in `paper-tab`.
61 61
62 Example: 62 Example:
63 63
64 ```html 64 <pre><code>
65 <style is="custom-style"> 65 &lt;style is="custom-style">
66 .link { 66 .link {
67 ``` 67 &#64;apply(--layout-horizontal);
68 &#64;apply(--layout-center-center);
69 }
70 &lt;/style>
71
72 &lt;paper-tabs selected="0">
73 &lt;paper-tab link>
74 &lt;a href="#link1" class="link">TAB ONE&lt;/a>
75 &lt;/paper-tab>
76 &lt;paper-tab link>
77 &lt;a href="#link2" class="link">TAB TWO&lt;/a>
78 &lt;/paper-tab>
79 &lt;paper-tab link>
80 &lt;a href="#link3" class="link">TAB THREE&lt;/a>
81 &lt;/paper-tab>
82 &lt;/paper-tabs>
83 </code></pre>
84
85 ### Styling
86
87 The following custom properties and mixins are available for styling:
88
89 | Custom property | Description | Default |
90 | --- | --- | --- |
91 | `--paper-tabs-selection-bar-color` | Color for the selection bar | `--paper-ye llow-a100` |
92 | `--paper-tabs` | Mixin applied to the tabs | `{}` |
68 93
69 94
70 95
71 ##&lt;paper-tab&gt; 96 ##&lt;paper-tab&gt;
72 97
73 `paper-tab` is styled to look like a tab. It should be used in conjunction with 98 `paper-tab` is styled to look like a tab. It should be used in conjunction with
74 `paper-tabs`. 99 `paper-tabs`.
75 100
76 Example: 101 Example:
77 102
(...skipping 13 matching lines...) Expand all
91 | --- | --- | --- | 116 | --- | --- | --- |
92 | `--paper-tab-ink` | Ink color | `--paper-yellow-a100` | 117 | `--paper-tab-ink` | Ink color | `--paper-yellow-a100` |
93 | `--paper-tab` | Mixin applied to the tab | `{}` | 118 | `--paper-tab` | Mixin applied to the tab | `{}` |
94 | `--paper-tab-content` | Mixin applied to the tab content | `{}` | 119 | `--paper-tab-content` | Mixin applied to the tab content | `{}` |
95 | `--paper-tab-content-unselected` | Mixin applied to the tab content when the t ab is not selected | `{}` | 120 | `--paper-tab-content-unselected` | Mixin applied to the tab content when the t ab is not selected | `{}` |
96 121
97 This element applies the mixin `--paper-font-common-base` but does not import `p aper-styles/typography.html`. 122 This element applies the mixin `--paper-font-common-base` but does not import `p aper-styles/typography.html`.
98 In order to apply the `Roboto` font to this element, make sure you've imported ` paper-styles/typography.html`. 123 In order to apply the `Roboto` font to this element, make sure you've imported ` paper-styles/typography.html`.
99 124
100 125
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698