Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit 77f2844

Browse files
committed
better progress demo
1 parent 61e105c commit 77f2844

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

demo.html

+23-18
Original file line numberDiff line numberDiff line change
@@ -19,51 +19,56 @@
1919

2020
<style>
2121

22-
23-
</style>
22+
body {
23+
font-family: sans-serif;
24+
}
2425

26+
</style>
2527
</head>
2628

2729
<body unresolved>
2830

29-
<polymer-element name="x-test" noscript attributes="value">
31+
<polymer-element name="x-progressbar" noscript attributes="value min max">
3032

3133
<template>
3234

3335
<style>
3436

3537
:host {
36-
display: inline-block;
37-
height: 25px;
38-
width: 300px;
39-
background-color: #ddd;
38+
display: block;
39+
height: 40px;
40+
background-color: #555;
41+
border-radius: 4px;
42+
padding: 8px;
43+
box-shadow: inset 0px 2px 5px rgba(0, 0, 0, 0.5);
4044
}
4145

4246
.progress {
43-
background-color: red;
47+
background-color: #999;
4448
height: 100%;
45-
padding: 5px 0;
46-
box-sizing: border-box;
47-
-moz-box-sizing: border-box;
49+
border-radius: 4px;
50+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
4851
}
4952

50-
core-input {
51-
border: 1px solid #ccc;
53+
.progress-value {
54+
padding: 0 8px;
55+
font-size: 18px;
56+
color: #fff;
5257
}
5358

5459
</style>
5560

56-
<core-range min="0" max="200" step="0.5" value="{{value}}" ratio="{{ratio}}"></core-range>
61+
<core-range min="{{min}}" max="{{max}}" value="{{value}}" ratio="{{ratio}}"></core-range>
5762

58-
<div class="progress" style="width: {{ratio}}%;">{{ratio}}%</div><br>
63+
<div class="progress" horizontal center layout _style="width: {{ratio}}%;">
64+
<div class="progress-value">{{ratio}}%</div>
65+
</div>
5966

60-
value (0 - 200): <core-input value="{{value}}"></core-input>
61-
6267
</template>
6368

6469
</polymer-element>
6570

66-
<x-test value="100"></x-test>
71+
<x-progressbar min="0" max="200" value="120"></x-progressbar>
6772

6873
</body>
6974
</html>

0 commit comments

Comments
 (0)