Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / ot-br-posix / repo / third_party / mdl / repo / src / button / README.md
1 ## Introduction
2
3 The Material Design Lite (MDL) **button** component is an enhanced version of the standard HTML `<button>` element. A button consists of text and/or an image that clearly communicates what action will occur when the user clicks or touches it. The MDL button component provides various types of buttons, and allows you to add both display and click effects.
4
5 Buttons are a ubiquitous feature of most user interfaces, regardless of a site's content or function. Their design and use is therefore an important factor in the overall user experience. See the button component's [Material Design specifications page](http://www.google.com/design/spec/components/buttons.html) for details.
6
7 The available button display types are *flat* (default), *raised*, *fab*, *mini-fab*, and *icon*; any of these types may be plain (light gray) or *colored*, and may be initially or programmatically *disabled*. The *fab*, *mini-fab*, and *icon* button types typically use a small image as their caption rather than text.
8
9 ### To include an MDL **button** component:
10
11 &nbsp;1. Code a `<button>` element. Include any desired attributes and values, such as an id or event handler, and add a text caption or image as appropriate.
12 ```html
13 <button>Save</button>
14 ```
15 &nbsp;2. Add one or more MDL classes, separated by spaces, to the button using the `class` attribute.
16 ```html
17 <button class="mdl-button mdl-js-button mdl-button--raised">Save</button>
18 ```
19
20 The button component is ready for use.
21
22 #### Examples
23
24 A button with the "raised" effect.
25 ```html
26 <button class="mdl-button mdl-js-button mdl-button--raised">Save</button>
27 ```
28
29 A button with the "fab" effect.
30 ```html
31 <button class="mdl-button mdl-js-button mdl-button--fab">OK</button>
32 ```
33
34 A button with the "icon" and "colored" effects.
35 ```html
36 <button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored">?</button>
37 ```
38
39
40 ## Configuration options
41
42 The MDL CSS classes apply various predefined visual and behavioral enhancements to the button. The table below lists the available classes and their effects.
43
44 | MDL class | Effect | Remarks |
45 |-----------|--------|---------|
46 | `mdl-button` | Defines button as an MDL component | Required |
47 | `mdl-js-button` | Assigns basic MDL behavior to button | Required |
48 | (none) | Applies *flat* display effect to button (default) |  |
49 | `mdl-button--raised` | Applies *raised* display effect | Mutually exclusive with *fab*, *mini-fab*, and *icon* |
50 | `mdl-button--fab` | Applies *fab* (circular) display effect | Mutually exclusive with *raised*, *mini-fab*, and *icon* |
51 | `mdl-button--mini-fab` | Applies *mini-fab* (small fab circular) display effect | Mutually exclusive with *raised*, *fab*, and *icon* |
52 | `mdl-button--icon` | Applies *icon* (small plain circular) display effect | Mutually exclusive with *raised*, *fab*, and *mini-fab*  |
53 | `mdl-button--colored` | Applies *colored* display effect (primary or accent color, depending on the type of button) | Colors are defined in `material.min.css` |
54 | `mdl-button--primary` | Applies *primary* color display effect | Colors are defined in `material.min.css` |
55 | `mdl-button--accent` | Applies *accent* color display effect | Colors are defined in `material.min.css` |
56 | `mdl-js-ripple-effect` | Applies *ripple* click effect | May be used in combination with any other classes |
57
58 >**Note:** Disabled versions of all the available button types are provided, and are invoked with the standard HTML boolean attribute `disabled`. `<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect" disabled>Raised Ripples Disabled</button>`. Alternatively, the `mdl-button--disabled` class can be used to achieve the same style but it does not disable the functionality of the element.
59 >This attribute may be added or removed programmatically via scripting.