|
25 | 25 | <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
|
26 | 26 | <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
27 | 27 | <style>
|
28 |
| - /* Make the demo look a little bit better */ |
29 |
| - fieldset { |
30 |
| - margin-bottom: 0.5rem; |
| 28 | + .demo-fabs { |
| 29 | + display: flex; |
| 30 | + flex-wrap: wrap; |
31 | 31 | }
|
32 | 32 |
|
33 |
| - fieldset .mdc-fab { |
| 33 | + legend { |
| 34 | + display: block; |
| 35 | + padding: 16px; |
| 36 | + padding-top: 64px; |
| 37 | + padding-bottom: 24px; |
| 38 | + } |
| 39 | + |
| 40 | + .mdc-fab { |
34 | 41 | margin: 16px;
|
35 | 42 | }
|
36 | 43 |
|
| 44 | + figcaption > div { |
| 45 | + margin: 8px; |
| 46 | + } |
| 47 | + |
37 | 48 | #demo-absolute-fab {
|
38 | 49 | position: fixed;
|
39 | 50 | bottom: 1rem;
|
|
47 | 58 | right: 1.5rem;
|
48 | 59 | }
|
49 | 60 | }
|
50 |
| - |
51 |
| - fieldset legend { |
52 |
| - display: block; |
53 |
| - padding: 16px; |
54 |
| - padding-top: 64px; |
55 |
| - padding-bottom: 24px; |
56 |
| - } |
57 |
| - |
58 |
| - .hero button { |
59 |
| - margin-left: 32px; |
60 |
| - margin-right: 32px; |
61 |
| - |
62 |
| - } |
63 |
| - |
64 | 61 | </style>
|
65 | 62 | </head>
|
66 | 63 | <body>
|
|
93 | 90 | </button>
|
94 | 91 |
|
95 | 92 | <section>
|
96 |
| - <fieldset> |
97 |
| - <legend>Normal FABs</legend> |
98 |
| - <button class="mdc-fab material-icons" aria-label="Favorite"> |
99 |
| - <span class="mdc-fab__icon"> |
100 |
| - favorite_border |
101 |
| - </span> |
102 |
| - </button> |
103 |
| - <button class="mdc-fab mdc-fab--mini material-icons" aria-label="Favorite"> |
104 |
| - <span class="mdc-fab__icon"> |
105 |
| - favorite_border |
106 |
| - </span> |
107 |
| - </button> |
108 |
| - <button class="mdc-fab mdc-fab--plain material-icons" aria-label="Favorite"> |
109 |
| - <span class="mdc-fab__icon"> |
110 |
| - favorite_border |
111 |
| - </span> |
112 |
| - </button> |
113 |
| - <button class="mdc-fab mdc-fab--mini mdc-fab--plain material-icons" aria-label="Favorite"> |
114 |
| - <span class="mdc-fab__icon"> |
115 |
| - favorite_border |
116 |
| - </span> |
117 |
| - </button> |
118 |
| - </fieldset> |
119 |
| - <fieldset> |
120 |
| - <legend>CSS Only FABs</legend> |
121 |
| - <button class="mdc-fab material-icons" aria-label="Favorite" data-demo-no-js> |
122 |
| - <span class="mdc-fab__icon"> |
123 |
| - favorite_border |
124 |
| - </span> |
125 |
| - </button> |
126 |
| - <button class="mdc-fab mdc-fab--mini material-icons" aria-label="Favorite" data-demo-no-js> |
127 |
| - <span class="mdc-fab__icon"> |
128 |
| - favorite_border |
129 |
| - </span> |
130 |
| - </button> |
131 |
| - <button class="mdc-fab mdc-fab--plain material-icons" aria-label="Favorite" data-demo-no-js> |
132 |
| - <span class="mdc-fab__icon"> |
133 |
| - favorite_border |
134 |
| - </span> |
135 |
| - </button> |
136 |
| - <button class="mdc-fab mdc-fab--mini mdc-fab--plain material-icons" aria-label="Favorite" data-demo-no-js> |
137 |
| - <span class="mdc-fab__icon"> |
138 |
| - favorite_border |
139 |
| - </span> |
140 |
| - </button> |
141 |
| - </fieldset> |
| 93 | + <legend>FABs with Ripple</legend> |
| 94 | + <div class="demo-fabs"> |
| 95 | + <figure> |
| 96 | + <button class="mdc-fab material-icons" aria-label="Favorite"> |
| 97 | + <span class="mdc-fab__icon"> |
| 98 | + favorite_border |
| 99 | + </span> |
| 100 | + </button> |
| 101 | + <figcaption> |
| 102 | + <div>Themed FAB</div> |
| 103 | + </figcaption> |
| 104 | + </figure> |
| 105 | + <figure> |
| 106 | + <button class="mdc-fab mdc-fab--mini material-icons" aria-label="Favorite"> |
| 107 | + <span class="mdc-fab__icon"> |
| 108 | + favorite_border |
| 109 | + </span> |
| 110 | + </button> |
| 111 | + <figcaption> |
| 112 | + <div>Mini FAB</div> |
| 113 | + <div><code>mdc-fab--mini</code></div> |
| 114 | + </figcaption> |
| 115 | + </figure> |
| 116 | + <figure> |
| 117 | + <button class="mdc-fab lightGreen800Fab material-icons" aria-label="Favorite"> |
| 118 | + <span class="mdc-fab__icon"> |
| 119 | + favorite_border |
| 120 | + </span> |
| 121 | + </button> |
| 122 | + <figcaption> |
| 123 | + <div>Customized Accessible FAB</div> |
| 124 | + <div><code>@include mdc-fab-accessible</code></div> |
| 125 | + </figcaption> |
| 126 | + </figure> |
| 127 | + <figure> |
| 128 | + <button class="mdc-fab lightGreen800Fab mdc-fab--mini material-icons" aria-label="Favorite"> |
| 129 | + <span class="mdc-fab__icon"> |
| 130 | + favorite_border |
| 131 | + </span> |
| 132 | + </button> |
| 133 | + <figcaption> |
| 134 | + <div>Customized Accessible Mini FAB</div> |
| 135 | + </figcaption> |
| 136 | + </figure> |
| 137 | + </div> |
| 138 | + </section> |
| 139 | + <section> |
| 140 | + <legend>CSS Only FABs</legend> |
| 141 | + <div class="demo-fabs"> |
| 142 | + <figure> |
| 143 | + <button class="mdc-fab material-icons" aria-label="Favorite" data-demo-no-js> |
| 144 | + <span class="mdc-fab__icon"> |
| 145 | + favorite_border |
| 146 | + </span> |
| 147 | + </button> |
| 148 | + </figure> |
| 149 | + <figure> |
| 150 | + <button class="mdc-fab mdc-fab--mini material-icons" aria-label="Favorite" data-demo-no-js> |
| 151 | + <span class="mdc-fab__icon"> |
| 152 | + favorite_border |
| 153 | + </span> |
| 154 | + </button> |
| 155 | + </figure> |
| 156 | + <figure> |
| 157 | + <button class="mdc-fab lightGreen800Fab material-icons" aria-label="Favorite" data-demo-no-js> |
| 158 | + <span class="mdc-fab__icon"> |
| 159 | + favorite_border |
| 160 | + </span> |
| 161 | + </button> |
| 162 | + </figure> |
| 163 | + <figure> |
| 164 | + <button class="mdc-fab lightGreen800Fab mdc-fab--mini material-icons" aria-label="Favorite" data-demo-no-js> |
| 165 | + <span class="mdc-fab__icon"> |
| 166 | + favorite_border |
| 167 | + </span> |
| 168 | + </button> |
| 169 | + </figure> |
| 170 | + </div> |
142 | 171 | </section>
|
143 | 172 | </main>
|
144 | 173 | <script src="/assets/material-components-web.js"></script>
|
|
0 commit comments