Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix first element padding of list-inline #12433

Merged
merged 1 commit into from Feb 9, 2014

Conversation

tagliala
Copy link
Contributor

Hi,

I noticed a strange behaviour of list-inline and I don't know if this is intended.

I'm using that class for list of tags and often they break up in multiple lines.

By default, elements on the lines other than the first, have a 5px padding on the left and I don't like that

The pull request contains a suggested fix (if this behaviour is not intended)

Example: http://jsfiddle.net/tagliala/rUZ2a/1/

@XhmikosR
Copy link
Member

XhmikosR commented Feb 6, 2014

I'm not exactly sure this is so simple. In your case it indeed works. But I believe the intention was to keep it vertically aligned with other elements.

For example imagine this:

<div class="col-lg-4 col-sm-4">
    <h3>Foo</h3>
    <ul class="list-inline">
        <li><a href="#"><i class="fa fa-facebook fa-2x"></i></a></li>
        <li><a href="#"><i class="fa fa-twitter fa-2x"></i></a></li>
        <li><a href="#"><i class="fa fa-google-plus fa-2x"></i></a></li>
        <li><a href="#"><i class="fa fa-rss fa-2x fa-2x"></i></a></li>
    </ul>
    <ul class="list-unstyled">
        <li><a href="#">Bar</a></li>
    </ul>
</div>

The list-inline will be -5px to the left compared to the other elements.

@tagliala
Copy link
Contributor Author

tagliala commented Feb 6, 2014

@XhmikosR thanks for your answer.

Since list-inline isn't documented, I don't know what is the exact use case but I also think that 5px should have a reason to be there.

BTW I'm not able to replicate your scenario: http://jsfiddle.net/tagliala/WF4yF/1/

image

For very small screens I always think the list-inline-fix gives better results

image

Maybe a situation like this? http://jsfiddle.net/tagliala/WF4yF/2/

image

IMHO In the latter case the 5px indentation has sense... but is that the rule or the exception? Where are we supposed to use list-inline?

@XhmikosR
Copy link
Member

XhmikosR commented Feb 6, 2014

Hmm, I must have applied your patch wrong the first time, cause now that I checked out your branch it works fine for my case too. Your patch, indeed, seems to make more sense.

@cvrebert: what do you think?

@cvrebert
Copy link
Collaborator

cvrebert commented Feb 6, 2014

@XhmikosR Nontrivial CSS/Less is @mdo's department, not mine.

mdo added a commit that referenced this pull request Feb 9, 2014
@mdo mdo merged commit 2365717 into twbs:master Feb 9, 2014
@mdo mdo mentioned this pull request Feb 9, 2014
1 task
stempler pushed a commit to stempler/bootstrap that referenced this pull request Apr 11, 2014
…element-fix

Fix first element padding of list-inline
stempler pushed a commit to stempler/bootstrap that referenced this pull request Nov 4, 2014
…element-fix

Fix first element padding of list-inline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants