Semantic-UI icon indicating copy to clipboard operation
Semantic-UI copied to clipboard

[1.0] right floated in list does not work

Open williamkhshea opened this issue 12 years ago • 5 comments

Please see the jsfiddle link for the test case: http://jsfiddle.net/mq9soya4/

williamkhshea avatar Nov 23 '14 15:11 williamkhshea

~~You can't just have right floated. You must say what it is~~ : a ui button? a ui label? [1]. See example at the docs http://beta.semantic-ui.com/elements/list.html#description

  <div class="item">
    <div class="right floated compact ui button">Add</div>
    <img class="ui avatar image" src="/images/avatar/small/justen.jpg">
    <div class="content">
      <div class="header">Justen Kitsune</div>
    </div>
  </div>

1: if you don't want to use a Semantic UI element you can add your own styles and classes in your stylesheets, e.g. .right.floated { float: right }

anestv avatar Nov 23 '14 17:11 anestv

@anestv Thanks for your quick response. It used to work in 0.19.3. I tried ui label and it does not work. It looks to me more like a bug rather than intended, as the documentation is saying "Any element inside a list can be floated left or right".

I have checked src / definitions / elements / list.less in 1.0 branch and find the right floated didn't specify you have to use on a button, but for some reason it just didn't work.

/* Floated Content */
.ui.list .list > .item > .left.floated
.ui.list > .item > .left.floated {
  float: left;
  margin-right: @floatMargin;
}
.ui.list .list > .item > .right.floated
.ui.list > .item > .right.floated {
  float: right;
  margin-left: @floatMargin;
}

williamkhshea avatar Nov 23 '14 18:11 williamkhshea

You are right. I looked for that code in the compiled file and I found it here . The problem is that there is no comma between the two lines in the less definition file.

anestv avatar Nov 23 '14 18:11 anestv

@anestv Good find. I didn't notice the missing comma.

williamkhshea avatar Nov 23 '14 18:11 williamkhshea

Thanks, sorry about that.

jlukic avatar Nov 23 '14 19:11 jlukic