Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / ot-br-posix / repo / third_party / mdl / repo / src / card / README.md
1 ## Introduction
2
3 The Material Design Lite (MDL) **card** component is a user interface element representing a virtual piece of paper that contains related data — such as a photo, some text, and a link — that are all about a single subject.
4
5 Cards are a convenient means of coherently displaying related content that is composed of different types of objects. They are also well-suited for presenting similar objects whose size or supported actions can vary considerably, like photos with captions of variable length. Cards have a constant width and a variable height, depending on their content.
6
7 Cards are a fairly new feature in user interfaces, and allow users an access point to more complex and detailed information. Their design and use is an important factor in the overall user experience. See the card component's [Material Design specifications page](http://www.google.com/design/spec/components/cards.html) for details.
8
9 ### To include an MDL **card** component:
10
11 &nbsp;1. Code a `<div>` element; this is the "outer" container, intended to hold all of the card's content.
12 ```html
13 <div>
14 </div>
15 ```
16 &nbsp;2. Inside the div, code one or more "inner" divs, one for each desired content block. A card containing a title, an image, some text, and an action bar would contain four "inner" divs, all siblings.
17 ```html
18 <div>
19   <div>
20   ...
21   </div>
22   <div>
23   ...
24   </div>
25   <div>
26   ...
27   </div>
28   <div>
29   ...
30   </div>
31 </div>
32 ```
33 &nbsp;3. Add one or more MDL classes, separated by spaces, to the "outer" div and the "inner" divs (depending on their intended use) using the `class` attribute.
34 ```html
35 <div class="mdl-card">
36   <div class="mdl-card__title">
37   ...
38   </div>
39   <div class="mdl-card__media">
40   ...
41   </div>
42   <div class="mdl-card__supporting-text">
43   ...
44   </div>
45   <div class="mdl-card__actions">
46   ...
47   </div>
48 </div>
49 ```
50 &nbsp;4. Add content to each "inner" div, again depending on its intended use, using standard HTML elements and, optionally, additional MDL classes.
51 ```html
52 <div class="mdl-card">
53   <div class="mdl-card__title">
54     <h2 class="mdl-card__title-text">title Text Goes Here</h2>
55   </div>
56   <div class="mdl-card__media">
57     <img src="photo.jpg" width="220" height="140" border="0" alt="" style="padding:20px;">
58   </div>
59   <div class="mdl-card__supporting-text">
60     This text might describe the photo and provide further information, such as where and
61     when it was taken.
62   </div>
63   <div class="mdl-card__actions">
64     <a href="(URL or function)">Related Action</a>
65   </div>
66 </div>
67 ```
68
69 The card component is ready for use.
70
71 #### Examples
72
73 A card (no shadow) with a title, image, text, and action.
74
75 ```html
76 <div class="mdl-card">
77   <div class="mdl-card__title">
78      <h2 class="mdl-card__title-text">Auckland Sky Tower<br>Auckland, New Zealand</h2>
79   </div>
80   <div class="mdl-card__media">
81     <img src="skytower.jpg" width="173" height="157" border="0" alt=""
82      style="padding:10px;">
83   </div>
84   <div class="mdl-card__supporting-text">
85   The Sky Tower is an observation and telecommunications tower located in Auckland,
86   New Zealand. It is 328 metres (1,076 ft) tall, making it the tallest man-made structure
87   in the Southern Hemisphere.
88   </div>
89   <div class="mdl-card__actions">
90      <a href="http://en.wikipedia.org/wiki/Sky_Tower_%28Auckland%29">Wikipedia entry</a>
91   </div>
92 </div>
93 ```
94
95 Card (level-3 shadow) with an image, caption, and text:
96
97 ```html
98 <div class="mdl-card mdl-shadow--4dp">
99   <div class="mdl-card__media"><img src="skytower.jpg" width="173" height="157" border="0"
100    alt="" style="padding:10px;">
101   </div>
102   <div class="mdl-card__supporting-text">
103     Auckland Sky Tower, taken March 24th, 2014
104   </div>
105   <div class="mdl-card__supporting-text">
106   The Sky Tower is an observation and telecommunications tower located in Auckland,
107   New Zealand. It is 328 metres (1,076 ft) tall, making it the tallest man-made structure
108   in the Southern Hemisphere.
109   </div>
110 </div>
111 ```
112
113 ## Configuration options
114
115 The MDL CSS classes apply various predefined visual and behavioral enhancements to the card. The table below lists the available classes and their effects.
116
117 | MDL class | Effect | Remarks |
118 |-----------|--------|---------|
119 | `mdl-card` | Defines div element as an MDL card container | Required on "outer" div |
120 | `mdl-card--border` | Adds a border to the card section that it's applied to | Used on the "inner" divs |
121 | `mdl-shadow--2dp through mdl-shadow--16dp` | Assigns variable shadow depths (2, 3, 4, 6, 8, or 16) to card | Optional, goes on "outer" div; if omitted, no shadow is present |
122 | `mdl-card__title` | Defines div as a card title container | Required on "inner" title div |
123 | `mdl-card__title-text` | Assigns appropriate text characteristics to card title | Required on head tag (H1 - H6) inside title div |
124 | `mdl-card__subtitle-text` | Assigns text characteristics to a card subtitle | Optional. Should be a child of the title element. |
125 | `mdl-card__media` | Defines div as a card media container | Required on "inner" media div |
126 | `mdl-card__supporting-text` | Defines div as a card body text container and assigns appropriate text characteristics to body text | Required on "inner" body text div; text goes directly inside the div with no intervening containers |
127 | `mdl-card__actions` | Defines div as a card actions container and assigns appropriate text characteristics to actions text | Required on "inner" actions div; content goes directly inside the div with no intervening containers |
128 | `mdl-card__menu` | Defines element as top right menu button | Optional. Should be a child of the `mdl-card` element. |