Skip to content

Commit

Permalink
adding example and fixes for single button sets with attached icons
Browse files Browse the repository at this point in the history
  • Loading branch information
addyosmani committed Dec 13, 2011
1 parent f15c725 commit 7a9218e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions css/custom-theme/jquery-ui-1.8.16.custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -630,22 +630,22 @@ display: inline-block; position: relative; padding: 0; margin-right: .1em; text-
}

.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
button.ui-button-icon-only { width: 2.4em; /*tempfix*/ margin-bottom:-9px; /*tempfix*/ padding:5px 14px 4px; } /* button elements seem to need a little more width */
.ui-button-icons-only { width: 3.4em; }
button.ui-button-icons-only { width: 3.7em; }

/*button text element */
.ui-button .ui-button-text { display: block; }
.ui-button-text-only .ui-button-text { }
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; /*tempfix*/ display:none;}
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
/* no icon support for input elements, provide padding by default */
input.ui-button { padding: .4em 1em; }

/*button icon element(s) */
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { /*position: absolute;*/ top: 50%; margin-top: -8px; }
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
Expand Down
12 changes: 8 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,14 @@ <h2 class="demoHeaders">Buttons</h2>
</div>


</br>
<div>
<button id="rerun">Run last action</button>
<button id="select">Select an action</button>
</div>


<br/>
<br/>
</br>
</br>

<h2 class="demoHeaders">Button set</h2>
<form style="margin-top: 1em;">
Expand Down Expand Up @@ -712,7 +716,7 @@ <h2 class="demoHeaders">Other</h2>
<span class="ui-icon ui-icon-volume-on" style="float:left; margin:-2px 5px 0 0;"></span>
Master volume
</p>

<!--static dialog-->


Expand Down

0 comments on commit 7a9218e

Please sign in to comment.