~bac/juju-gui/trunkcopy

« back to all changes in this revision

Viewing changes to lib/yui/docs/button/cssbutton.html

  • Committer: kapil.foss at gmail
  • Date: 2012-07-13 18:45:59 UTC
  • Revision ID: kapil.foss@gmail.com-20120713184559-2xl7be17egsrz0c9
reshape

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html>
2
 
<html lang="en">
3
 
<head>
4
 
    <meta charset="utf-8">
5
 
    <title>Example: Styling elements with cssbutton</title>
6
 
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Maven+Pro:400,700">
7
 
    <link rel="stylesheet" href="../../build/cssgrids/grids-min.css">
8
 
    <link rel="stylesheet" href="../assets/css/main.css">
9
 
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
10
 
    <script src="../../build/yui/yui-min.js"></script>
11
 
</head>
12
 
<body>
13
 
 
14
 
<div id="doc">
15
 
    <h1>Example: Styling elements with cssbutton</h1>
16
 
 
17
 
    
18
 
        <a href="#toc" class="jump">Jump to Table of Contents</a>
19
 
    
20
 
 
21
 
    <div class="yui3-g">
22
 
        <div class="yui3-u-3-4">
23
 
            <div id="main">
24
 
                <div class="content"><link rel="stylesheet" href='../../build/cssbutton/cssbutton.css'></link>
25
 
<style>.yui3-button {
26
 
    margin:3px;
27
 
}
28
 
 
29
 
.warning{
30
 
    background-color:#FAF55F;
31
 
}
32
 
 
33
 
.success{
34
 
    background-color:#57A957;
35
 
    color:white;
36
 
}
37
 
 
38
 
.error{
39
 
    background-color:#C43C35;
40
 
    color:white;
41
 
}
42
 
 
43
 
.notice{
44
 
    background-color:#1B7AE0;
45
 
    color:white;
46
 
}
47
 
 
48
 
.yui3-button-icon {
49
 
    background-image: url("../assets/button/icon-sprite-dark-and-light-24.png");
50
 
    background-repeat: no-repeat;
51
 
    display: inline-block;
52
 
    height: 20px;
53
 
    vertical-align: middle;
54
 
    width: 20px;
55
 
}
56
 
 
57
 
.yui3-button-icon-bold {
58
 
    background-position: 1px 1px;
59
 
}
60
 
 
61
 
.yui3-button-icon-italic {
62
 
    background-position: 1px -35px;
63
 
}
64
 
 
65
 
.yui3-button-icon-underline {
66
 
    background-position: 1px -71px;
67
 
}</style>
68
 
 
69
 
<div class="intro">
70
 
    <p>In this example, we'll look at a few ways to use the <code>&#x27;cssbutton&#x27;</code> module to enhance the look &amp; feel of the default browser buttons.</p>
71
 
</div>
72
 
 
73
 
<div class="example">
74
 
    <!-- Include the cssbutton stylesheet -->
75
 
<link ref="stylsheet" href="http://yui.yahooapis.com/3.5.1/build/cssbutton/cssbutton.css">
76
 
 
77
 
<h4 id="button-tags">Button Tags</h4>
78
 
<button class='yui3-button'>&lt;button&gt;</button>
79
 
<input type='button' class='yui3-button' value='&lt;input type="button"&gt;'>
80
 
<input type='submit' class='yui3-button' value='&lt;input type="submit"&gt;'>
81
 
 
82
 
<h4 id="other-tags">Other Tags</h4>
83
 
<div class='yui3-button'>&lt;div&gt;</div>
84
 
<span class='yui3-button'>&lt;span&gt;</span>
85
 
<a class='yui3-button'>&lt;a&gt;</a>
86
 
 
87
 
<h4 id="colors">Colors</h4>
88
 
<button class='yui3-button success'>.success <br> #57A957</button>
89
 
<button class='yui3-button warning'>.warning <br> #FAF55F</button>
90
 
<button class='yui3-button error'>.error <br> #C43C35</button>
91
 
<button class='yui3-button notice'>.notice <br> #1B7AE0</button>
92
 
 
93
 
<h4 id="icon-buttons">Icon Buttons</h4>
94
 
<button class='yui3-button'>
95
 
    <span class='yui3-button-icon yui3-button-icon-bold'></span>
96
 
</button>
97
 
 
98
 
<button class='yui3-button'>
99
 
    <span class='yui3-button-icon yui3-button-icon-italic'></span>
100
 
</button>
101
 
 
102
 
<button class='yui3-button'>
103
 
    <span class='yui3-button-icon yui3-button-icon-underline'></span>
104
 
</button>
105
 
 
106
 
<h4 id="image-button">Image Button</h4>
107
 
<input type='image' id='imageButton' class='yui3-button' src="../assets/button/yui-logo.png"></input>
108
 
 
109
 
</div>
110
 
 
111
 
<h4 id="source-html">Source: HTML</h4>
112
 
<pre class="code prettyprint">&lt;!-- Include the cssbutton stylesheet --&gt;
113
 
&lt;link ref=&quot;stylsheet&quot; href=&quot;http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.5.1&#x2F;build&#x2F;cssbutton&#x2F;cssbutton.css&quot;&gt;
114
 
 
115
 
&lt;h4&gt;Button Tags&lt;&#x2F;h4&gt;
116
 
&lt;button class=&#x27;yui3-button&#x27;&gt;&amp;lt;button&amp;gt;&lt;&#x2F;button&gt;
117
 
&lt;input type=&#x27;button&#x27; class=&#x27;yui3-button&#x27; value=&#x27;&amp;lt;input type=&quot;button&quot;&amp;gt;&#x27;&gt;
118
 
&lt;input type=&#x27;submit&#x27; class=&#x27;yui3-button&#x27; value=&#x27;&amp;lt;input type=&quot;submit&quot;&amp;gt;&#x27;&gt;
119
 
 
120
 
&lt;h4&gt;Other Tags&lt;&#x2F;h4&gt;
121
 
&lt;div class=&#x27;yui3-button&#x27;&gt;&amp;lt;div&amp;gt;&lt;&#x2F;div&gt;
122
 
&lt;span class=&#x27;yui3-button&#x27;&gt;&amp;lt;span&amp;gt;&lt;&#x2F;span&gt;
123
 
&lt;a class=&#x27;yui3-button&#x27;&gt;&amp;lt;a&amp;gt;&lt;&#x2F;a&gt;
124
 
 
125
 
&lt;h4&gt;Colors&lt;&#x2F;h4&gt;
126
 
&lt;button class=&#x27;yui3-button success&#x27;&gt;.success &lt;br&gt; #57A957&lt;&#x2F;button&gt;
127
 
&lt;button class=&#x27;yui3-button warning&#x27;&gt;.warning &lt;br&gt; #FAF55F&lt;&#x2F;button&gt;
128
 
&lt;button class=&#x27;yui3-button error&#x27;&gt;.error &lt;br&gt; #C43C35&lt;&#x2F;button&gt;
129
 
&lt;button class=&#x27;yui3-button notice&#x27;&gt;.notice &lt;br&gt; #1B7AE0&lt;&#x2F;button&gt;
130
 
 
131
 
&lt;h4&gt;Icon Buttons&lt;&#x2F;h4&gt;
132
 
&lt;button class=&#x27;yui3-button&#x27;&gt;
133
 
    &lt;span class=&#x27;yui3-button-icon yui3-button-icon-bold&#x27;&gt;&lt;&#x2F;span&gt;
134
 
&lt;&#x2F;button&gt;
135
 
 
136
 
&lt;button class=&#x27;yui3-button&#x27;&gt;
137
 
    &lt;span class=&#x27;yui3-button-icon yui3-button-icon-italic&#x27;&gt;&lt;&#x2F;span&gt;
138
 
&lt;&#x2F;button&gt;
139
 
 
140
 
&lt;button class=&#x27;yui3-button&#x27;&gt;
141
 
    &lt;span class=&#x27;yui3-button-icon yui3-button-icon-underline&#x27;&gt;&lt;&#x2F;span&gt;
142
 
&lt;&#x2F;button&gt;
143
 
 
144
 
&lt;h4&gt;Image Button&lt;&#x2F;h4&gt;
145
 
&lt;input type=&#x27;image&#x27; id=&#x27;imageButton&#x27; class=&#x27;yui3-button&#x27; src=&quot;..&#x2F;assets&#x2F;button&#x2F;yui-logo.png&quot;&gt;&lt;&#x2F;input&gt;</pre>
146
 
 
147
 
 
148
 
<h4 id="source-css">Source: CSS</h4>
149
 
<pre class="code prettyprint">.yui3-button {
150
 
    margin:3px;
151
 
}
152
 
 
153
 
.warning{
154
 
    background-color:#FAF55F;
155
 
}
156
 
 
157
 
.success{
158
 
    background-color:#57A957;
159
 
    color:white;
160
 
}
161
 
 
162
 
.error{
163
 
    background-color:#C43C35;
164
 
    color:white;
165
 
}
166
 
 
167
 
.notice{
168
 
    background-color:#1B7AE0;
169
 
    color:white;
170
 
}
171
 
 
172
 
.yui3-button-icon {
173
 
    background-image: url(&quot;..&#x2F;assets&#x2F;button&#x2F;icon-sprite-dark-and-light-24.png&quot;);
174
 
    background-repeat: no-repeat;
175
 
    display: inline-block;
176
 
    height: 20px;
177
 
    vertical-align: middle;
178
 
    width: 20px;
179
 
}
180
 
 
181
 
.yui3-button-icon-bold {
182
 
    background-position: 1px 1px;
183
 
}
184
 
 
185
 
.yui3-button-icon-italic {
186
 
    background-position: 1px -35px;
187
 
}
188
 
 
189
 
.yui3-button-icon-underline {
190
 
    background-position: 1px -71px;
191
 
}</pre>
192
 
 
193
 
</div>
194
 
            </div>
195
 
        </div>
196
 
 
197
 
        <div class="yui3-u-1-4">
198
 
            <div class="sidebar">
199
 
                
200
 
                    <div id="toc" class="sidebox">
201
 
                        <div class="hd">
202
 
                            <h2 class="no-toc">Table of Contents</h2>
203
 
                        </div>
204
 
 
205
 
                        <div class="bd">
206
 
                            <ul class="toc">
207
 
<li>
208
 
<a href="#button-tags">Button Tags</a>
209
 
</li>
210
 
<li>
211
 
<a href="#other-tags">Other Tags</a>
212
 
</li>
213
 
<li>
214
 
<a href="#colors">Colors</a>
215
 
</li>
216
 
<li>
217
 
<a href="#icon-buttons">Icon Buttons</a>
218
 
</li>
219
 
<li>
220
 
<a href="#image-button">Image Button</a>
221
 
</li>
222
 
<li>
223
 
<a href="#source-html">Source: HTML</a>
224
 
</li>
225
 
<li>
226
 
<a href="#source-css">Source: CSS</a>
227
 
</li>
228
 
</ul>
229
 
                        </div>
230
 
                    </div>
231
 
                
232
 
 
233
 
                
234
 
                    <div class="sidebox">
235
 
                        <div class="hd">
236
 
                            <h2 class="no-toc">Examples</h2>
237
 
                        </div>
238
 
 
239
 
                        <div class="bd">
240
 
                            <ul class="examples">
241
 
                                
242
 
                                    
243
 
                                        <li data-description="This example shows how you can easily style button and non-button DOM elements to appear as buttons">
244
 
                                            <a href="cssbutton.html">Styling elements with cssbutton</a>
245
 
                                        </li>
246
 
                                    
247
 
                                
248
 
                                    
249
 
                                        <li data-description="This example shows a simple, light solution to enhance &lt;button&gt; nodes">
250
 
                                            <a href="button-plugin.html">Enhancing &lt;button&gt; nodes with button-plugin</a>
251
 
                                        </li>
252
 
                                    
253
 
                                
254
 
                                    
255
 
                                        <li data-description="This example demonstrates how to create button widgets">
256
 
                                            <a href="button.html">Basic button widgets</a>
257
 
                                        </li>
258
 
                                    
259
 
                                
260
 
                                    
261
 
                                        <li data-description="This example demonstrates how to create a widget containing a group of buttons">
262
 
                                            <a href="button-group.html">Managing groups of buttons with button-group</a>
263
 
                                        </li>
264
 
                                    
265
 
                                
266
 
                            </ul>
267
 
                        </div>
268
 
                    </div>
269
 
                
270
 
 
271
 
                
272
 
            </div>
273
 
        </div>
274
 
    </div>
275
 
</div>
276
 
 
277
 
<script src="../assets/vendor/prettify/prettify-min.js"></script>
278
 
<script>prettyPrint();</script>
279
 
 
280
 
</body>
281
 
</html>