Blame view

bower_components/paper-item/paper-item-body.html 2.66 KB
73bcce88   luigser   COMPONENTS
1
  <!--
e619a3b0   Luigi Serra   Controllet cross ...
2
3
4
5
6
7
8
  @license
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  Code distributed by Google as part of the polymer project is also
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
73bcce88   luigser   COMPONENTS
9
10
11
  -->
  
  <link rel="import" href="../polymer/polymer.html">
a1a3bc73   Luigi Serra   graphs updates
12
13
14
  <link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
  <link rel="import" href="../paper-styles/default-theme.html">
  <link rel="import" href="../paper-styles/typography.html">
73bcce88   luigser   COMPONENTS
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
  
  <!--
  Use `<paper-item-body>` in a `<paper-item>` or `<paper-icon-item>` to make two- or
  three- line items. It is a flex item that is a vertical flexbox.
  
      <paper-item>
        <paper-item-body two-line>
          <div>Show your status</div>
          <div secondary>Your status is visible to everyone</div>
        </paper-item-body>
      </paper-item>
  
  The child elements with the `secondary` attribute is given secondary text styling.
  
  ### Styling
  
  The following custom properties and mixins are available for styling:
  
  Custom property | Description | Default
  ----------------|-------------|----------
  `--paper-item-body-two-line-min-height`   | Minimum height of a two-line item          | `72px`
  `--paper-item-body-three-line-min-height` | Minimum height of a three-line item        | `88px`
  `--paper-item-body-secondary-color`       | Foreground color for the `secondary` area  | `--secondary-text-color`
  `--paper-item-body-secondary`             | Mixin applied to the `secondary` area      | `{}`
  
  -->
  
  <dom-module id="paper-item-body">
73bcce88   luigser   COMPONENTS
43
    <template>
e619a3b0   Luigi Serra   Controllet cross ...
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
      <style>
        :host {
          overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
          @apply(--layout-vertical);
          @apply(--layout-center-justified);
          @apply(--layout-flex);
        }
  
        :host([two-line]) {
          min-height: var(--paper-item-body-two-line-min-height, 72px);
        }
  
        :host([three-line]) {
          min-height: var(--paper-item-body-three-line-min-height, 88px);
        }
  
        :host > ::content > * {
e619a3b0   Luigi Serra   Controllet cross ...
61
62
          overflow: hidden;
          text-overflow: ellipsis;
a1a3bc73   Luigi Serra   graphs updates
63
          white-space: nowrap;
e619a3b0   Luigi Serra   Controllet cross ...
64
65
66
        }
  
        :host > ::content [secondary] {
e619a3b0   Luigi Serra   Controllet cross ...
67
68
          @apply(--paper-font-body1);
  
a1a3bc73   Luigi Serra   graphs updates
69
70
          color: var(--paper-item-body-secondary-color, --secondary-text-color);
  
e619a3b0   Luigi Serra   Controllet cross ...
71
72
73
74
          @apply(--paper-item-body-secondary);
        }
      </style>
  
73bcce88   luigser   COMPONENTS
75
76
77
      <content></content>
    </template>
  
e619a3b0   Luigi Serra   Controllet cross ...
78
79
80
81
82
    <script>
      Polymer({
        is: 'paper-item-body'
      });
    </script>
73bcce88   luigser   COMPONENTS
83
  </dom-module>