Skip to content

Commit

Permalink
* Now right-floating select box hints (i.e. <small> tags), which was …
Browse files Browse the repository at this point in the history
…my original plan. It caused a bug around which I worked by forcing a style temporarily... Weird bug, but whatever... Works in Chrome now. Haven't tested in other browsers, but as usual, if you're not getting paid for something, you'll have to rely on others to do some of the testing for you. (index.css, sbox.js)
  • Loading branch information
Nao committed Sep 29, 2014
1 parent a230857 commit 95d35e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions core/javascript/sbox.js
Expand Up @@ -245,11 +245,14 @@
.height('');

// Hide .details so that the new width won't be influenced by it.
// Also, floated <small>'s will screw up calculations, at least in Chrome.
$dd.find('.details').toggle();
$dd.find('small').css('float', 'none');
// Set dropdown width to at least the display area's width, and at most the body's width.
$dd.width(Math.min($('body').width(), Math.max($dd.realWidth(), $display.outerWidth() - $dd.outerWidth(true) + $dd.realWidth())));
// Now we can reset.
$dd.find('.details').toggle();
$dd.find('small').css('float', '');

var
// Figure out if we should show above/below the display box, first by calculating the free space around it.
Expand Down
6 changes: 4 additions & 2 deletions core/skins/index.css
Expand Up @@ -545,10 +545,12 @@ select.sb
text-align: left
margin: 1px

.text mixes .inline-block
vertical-align: baseline
.text mixes .inline-block("baseline")
width: 100%
small
color: #aaa
float: right
margin-left: 5px

.details
font-style: italic
Expand Down

0 comments on commit 95d35e4

Please sign in to comment.