atom / one-light-ui

Atom One light UI theme
MIT License
73 stars 62 forks source link

Items in select-list don't get floated #137

Closed idleberg closed 6 years ago

idleberg commented 6 years ago

Prerequisites

Description

One of my Atom packages makes use of atom-select-list to display a select list similar to the following. Pay special attention to the floated badge.

<div class="select-list local-storage-list">
    <!-- omitting scrollview markup to keep it short -->

    <ol class="list-group">

        <li class="inline-block">
            <div class="icon icon-database">
                Example entry
                <div class="pull-right">
                  <span class="badge badge-info">true</span>
              </div>
          </div>
      </li>
  </ol>
</div>

Both, one-dark-ui and one-dark-light, display the select-list differently from about every other theme I've tried.

Atom Light:

screen shot 2018-06-03 at 22 28 20

One Light:

screen shot 2018-06-03 at 22 28 54

This is caused by the inline-block defined here and can be fixed by setting it to block. However, I'm unaware of the side-effects this might have.

.list-group .icon, .list-tree .icon {
    display: inline-block;
    height: inherit;
}

Steps to Reproduce

  1. Create a package that uses select-list with markup similar to the snippet above (or simply install local-store
  2. Invoke the select-list (or run Local Storage: Open Item)

Expected behavior: The badges should be floated right

Actual behavior: The badges aren't floated at all.

Reproduces how often: 100%

Versions

$ atom --version

Atom    : 1.27.2
Electron: 1.7.15
Chrome  : 58.0.3029.110
Node    : 7.9.0

$ apm --version

apm  1.19.0
npm  3.10.10
node 6.9.5 x64
atom 1.27.2
python 2.7.10
git 2.15.1

Additional Information

Tested on macOS 10.13.5 (17F77) & Windows 10 (Build 17134.48)

simurai commented 6 years ago

This should be fixed in Atom 1.31.

An alternative would be to not nest the .pull-right element inside the .icon:

<li class="inline-block">
  <div class="icon icon-database">
    Example entry
  </div>
  <div class="pull-right">
    <span class="badge badge-info">true</span>
  </div>
</li>