Skip to content

Commit b951ba8

Browse files
committed
Merge pull request Polymer#672 from Polymer/fix671
Update paper-button to latest API changes
2 parents e00aa0a + 701ccd1 commit b951ba8

25 files changed

Lines changed: 102 additions & 88 deletions

_includes/footer.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<footer>
22
<div>
33
<div class="links">
4-
<a href="/docs/start/getting-the-code.html"><paper-button icon="archive" label="Get {{site.project_title}}" raisedButton></paper-button></a>
5-
<a href="http://plus.google.com/107187849809354688692/"><paper-button icon="social:post-gplus" label="+{{site.project_title}}"></paper-button></a>
6-
<a href="https://twitter.com/intent/follow?screen_name=polymer" data-twitter-follow title="Follow @polymer on Twitter"><paper-button icon="social:post-twitter" label="@polymer"></paper-button></a>
7-
<a href="https://github.com/polymer"><paper-button class="github" icon="social:post-github" label="/{{site.project_title}}"></paper-button></a>
8-
<a href="https://github.com/Polymer/polymer/issues/new"><paper-button icon="bug-report" label="File a bug"></paper-button></a>
4+
<a href="/docs/start/getting-the-code.html"><paper-button raised><core-icon icon="archive"></core-icon>Get {{site.project_title}}</paper-button></a>
5+
<a href="http://plus.google.com/107187849809354688692/"><paper-button> <core-icon icon="social:post-gplus"></core-icon>+{{site.project_title}}</paper-button></a>
6+
<a href="https://twitter.com/intent/follow?screen_name=polymer" data-twitter-follow title="Follow @polymer on Twitter"><paper-button><core-icon icon="social:post-twitter"></core-icon>@polymer</paper-button></a>
7+
<a href="https://github.com/polymer"><paper-button class="github"><core-icon icon="social:post-github"></core-icon>/{{site.project_title}}</paper-button></a>
8+
<a href="https://github.com/Polymer/polymer/issues/new"><paper-button><core-icon icon="bug-report"></core-icon>File a bug</paper-button></a>
99
</div>
1010
<p id="copyright">&copy; 2014 {{site.project_title}} Authors. Code licensed under the <a href="http://polymer.github.io/LICENSE.txt" target="_blank">BSD License</a>. Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.</p>
1111
</div>
@@ -21,4 +21,4 @@
2121
<script src="/js/prettify/prettify.js"></script>
2222
{% endif %}
2323
<!-- <script src="/js/bower_components/smoothscroll/smoothscroll.js"></script> -->
24-
<script src="/js/app.js"></script>
24+
<script src="/js/app.js?{{site.time | date: '%Y%m%d'}}"></script>

app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
application: polymer-project
2-
version: 2014-09-18
2+
version: 2014-09-30
33
runtime: python27
44
api_version: 1
55
threadsafe: yes

css/homepage.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/paper-button.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/site2.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/elements/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ add_permalinks: false
4848
<h2><a href="/docs/elements/core-elements.html#core-ajax">{{site.project_title}} core elements</a></h2>
4949
<p>{{site.project_title}}'s core elements are a set of visual and non-visual utility elements. They include elements for working with layout, user input, selection, and scaffolding apps.</p>
5050
<div horizontal layout>
51-
<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fdocs%2Felements%2Fcore-elements.html%23core-ajax"><paper-button label="Docs"></paper-button></a>
52-
<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fcomponents%2Fcore-elements%2Fdemo.html%23core-scroll-header-panel"><paper-button label="Demos"></paper-button></a>
51+
<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fdocs%2Felements%2Fcore-elements.html%23core-ajax"><paper-button>Docs</paper-button></a>
52+
<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fcomponents%2Fcore-elements%2Fdemo.html%23core-scroll-header-panel"><paper-button>Demos</paper-button></a>
5353
</div>
5454
</section>
5555
<a href="/components/core-elements/demo.html#core-scroll-header-panel" target="_blank">
@@ -63,8 +63,8 @@ add_permalinks: false
6363
<h2><a href="/docs/elements/paper-elements.html#paper-button">Paper elements</a></h2>
6464
<p>{{site.project_title}}'s paper elements collection implements material design for the web. They're a set of highly visual, highly interactive elements that include things like controls, layouts, hero transitions, and scrolling effects.</p>
6565
<p>
66-
<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fdocs%2Felements%2Fpaper-elements.html%23paper-button"><paper-button label="Docs"></paper-button></a>
67-
<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fcomponents%2Fpaper-elements%2Fdemo.html%23core-toolbar"><paper-button label="Demos"></paper-button></a>
66+
<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fdocs%2Felements%2Fpaper-elements.html%23paper-button"><paper-button>Docs</paper-button></a>
67+
<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fcomponents%2Fpaper-elements%2Fdemo.html%23core-toolbar"><paper-button>Demos</paper-button></a>
6868
</p>
6969
</section>
7070
<a href="/components/paper-elements/demo.html#core-toolbar" target="_blank">

docs/elements/material.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ subtitle: Guide
1717
width: 150px;
1818
}
1919

20-
paper-button.purpleRipple::shadow #ripple {
20+
paper-button.purpleRipple::shadow paper-ripple {
2121
color: #9f499b;
2222
}
2323
.demo-card {
@@ -118,7 +118,7 @@ controls.
118118
<tr>
119119
<td>Button<br>
120120
<a href="/docs/elements/paper-elements.html#paper-button"><code>&lt;paper-button&gt;</code></a></td>
121-
<td><paper-button label="play" raisedButton></paper-button></td>
121+
<td><paper-button>play</paper-button></td>
122122
<td><a href="/components/paper-elements/demo.html#paper-button"><core-icon icon="arrow-forward" size="16"></core-icon> More examples</a></td>
123123
</tr>
124124
<tr>
@@ -204,19 +204,19 @@ The following example creates a dialog with two buttons:
204204
transition="paper-dialog-transition-bottom">
205205
<p>This app would like to launch a small, unmanned vehicle
206206
into space.</p>
207-
<paper-button label="Cancel" dismissive></paper-button>
208-
<paper-button label="OK" affirmative default></paper-button>
207+
<paper-button dismissive>Cancel</paper-button>
208+
<paper-button affirmative default>OK</paper-button>
209209
</paper-dialog>
210210

211211
<paper-dialog id="dialog" heading="Launch?" transition="paper-dialog-transition-bottom">
212212
<p>This app would like to launch a small, unmanned vehicle into space.</p>
213213

214-
<paper-button label="Cancel" dismissive></paper-button>
215-
<paper-button label="OK" affirmative default></paper-button>
214+
<paper-button dismissive>Cancel</paper-button>
215+
<paper-button affirmative default>OK</paper-button>
216216

217217
</paper-dialog>
218218

219-
<paper-button id="dialog-button" label="Show me the dialog" raisedButton></paper-button>
219+
<paper-button id="dialog-button" raised>Show me the dialog</paper-button>
220220

221221
In this example, the default button has a `default` attribute. The dialog
222222
doesn't apply any special treatment for a default option; you can style it
@@ -237,7 +237,7 @@ lower-left on mobile. Use the `text` attribute to specify the text to display.
237237

238238
<paper-toast id="toast" text="Your draft has been discarded."></paper-toast>
239239

240-
<paper-button id="toast-button" label="Show me the snackbar" raisedButton></paper-button>
240+
<paper-button id="toast-button" raised>Show me the snackbar</paper-button>
241241

242242
Like a dialog, a `<paper-toast>` is hidden by default. Call the element's
243243
`open` method to display it. The toast disappears after a timeout, or can be
@@ -259,39 +259,37 @@ that moves out radially from the origin of the event. These effects are built
259259
into the
260260
[paper elements collection](paper-elements.html):
261261

262-
<paper-button class="purpleRipple"
263-
label="Show me the ripple" raisedButton></paper-button>
262+
<paper-button class="purpleRipple" raised>Show me the ripple</paper-button>
264263

265264
When working with other elements, you can use the `<paper-ripple>` element to
266265
create a touch ripple effect.
267266

268267
To use `<paper-ripple>`, declare a `<paper-ripple>` element as a child of the
269268
element you want to add the effect to:
270269

271-
<div style="position: relative;">
270+
<div>
272271
<paper-ripple fit></paper-ripple>
273272
</div>
274273

275274
Touch the cards and icon below to see ripple effects.
276275

277276
<div layout horizontal wrap>
278277
<div class="labeled-card" layout vertical>
279-
<div class="demo-card" style="position: relative;">
278+
<div class="demo-card">
280279
<paper-ripple fit></paper-ripple>
281280
</div>
282281
<p>Default ripple</p>
283282
</div>
284283

285284
<div class="labeled-card" layout vertical>
286-
<div class="demo-card" style="position: relative;">
285+
<div class="demo-card">
287286
<paper-ripple fit style="color: red;"></paper-ripple>
288287
</div>
289288
<p>Colored ripple</p>
290289
</div>
291290

292291
<div class="labeled-card" layout vertical>
293-
<div class="demo-card" style="position: relative; border: none;"
294-
layout vertical center center-justified>
292+
<div class="demo-card" style="border: none;" layout vertical center-center>
295293
<core-icon icon="info"></core-icon>
296294
<paper-ripple fit class="circle"></paper-ripple>
297295
</div>
@@ -306,7 +304,7 @@ position the ripple appropriately. (See
306304
and other layout attributes.)
307305

308306
You can clip the ripple to a circle by adding the `circle` class to the
309-
ripple's classlist. Circular ripples are used for small buttons used in a grid
307+
ripple's `classlist`. Circular ripples are used for small buttons used in a grid
310308
layout (for example, icon buttons, number pads).
311309

312310
You can set the color of the ripple using the `color` CSS property.
@@ -316,17 +314,16 @@ You can set the color of the ripple using the `color` CSS property.
316314
}
317315

318316
When using a paper element, check the element API doc to find the CSS selector
319-
to style the ripple. Most elements that have a ripple have a `<paper-ripple>`
320-
in the shadow DOM with an ID of `ink` or `ripple`. For example, to style a
321-
button:
317+
to style the ripple. Elements that have a ripple have a `<paper-ripple>`
318+
in the shadow DOM. For example, to style a button:
322319

323-
paper-button::shadow #ripple {
320+
paper-button::shadow paper-ripple {
324321
color: blue;
325322
}
326323

327324
To style a checkbox:
328325

329-
paper-checkbox::shadow #ink {
326+
paper-checkbox::shadow paper-ripple {
330327
color: blue;
331328
}
332329

@@ -337,10 +334,10 @@ elements can have a z-height between 0 and 5. Material can raise or lower in
337334
response to user input.
338335

339336
The `paper-elements` have shadow effects built-in. For example, a
340-
`<paper-button>` declared with the `raisedButton` attribute appears raised
341-
above thesurface it rests on, and raises up when touched.
337+
`<paper-button>` declared with the `raised` attribute appears raised
338+
above the surface it rests on, and raises up when touched.
342339

343-
<paper-button label="Raised button" raisedButton></paper-button>
340+
<paper-button raised>Raised button</paper-button>
344341

345342
When building your own elements or using standard DOM elements, you can use
346343
the `<paper-shadow>` element to create the appropriate shadow effect.

docs/polymer/databinding.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ For example, the `selectStory` method might look like this:
209209
Continue on to:
210210

211211
<a href="/docs/polymer/binding-types.html">
212-
<paper-button icon="arrow-forward" label="Types of bindings" raisedButton></paper-button>
212+
<paper-button raised><core-icon icon="arrow-forward"></core-icon>Types of bindings</paper-button>
213213
</a>
214214

215215
<a href="/docs/polymer/expressions.html">
216-
<paper-button icon="arrow-forward" label="Expressions" raisedButton></paper-button>
216+
<paper-button raised><core-icon icon="arrow-forward"></core-icon>Expressions</paper-button>
217217
</a>

docs/polymer/debugging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ To quickly check whether elements are registered, you can use this bookmarklet (
120120

121121
The bookmarklet checks for element that look like custom elements, but have the generic `HTMLElement` constructor. An element "looks like" a custom element if it has a dash in its name or uses the `is` attribute:
122122

123-
<paper-button></paper-button>
124-
<form is="ajax-form></form>
123+
<paper-button>Button</paper-button>
124+
<form is="ajax-form"></form>
125125

126126
Since this method doesn't use any Polymer APIs, it works for any custom element, Polymer or otherwise.
127127

docs/start/creatingelements.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ The use of the `id` attribute has traditionally been discouraged as an anti-patt
198198
Now that you know how to create your own elements, dive deeper and read up on [{{site.project_title}}'s core API](/docs/polymer/polymer.html). If you'd like to know more about the underlying technologies that make {{site.project_title}} and Web Components possible, check out [the Platform guide](/docs/start/platform.html). Continue on to:
199199

200200
<a href="/docs/polymer/polymer.html">
201-
<paper-button icon="arrow-forward" label="API developer guide" raisedButton></paper-button>
201+
<paper-button raised><core-icon icon="arrow-forward"></core-icon>API developer guide</paper-button>
202202
</a>
203203

204204
<a href="/docs/start/platform.html">
205-
<paper-button icon="arrow-forward" label="The Platform" raisedButton></paper-button>
205+
<paper-button raised><core-icon icon="arrow-forward"></core-icon>The Platform</paper-button>
206206
</a>
207207

208208

0 commit comments

Comments
 (0)