GithubHelp home page GithubHelp logo

Comments (7)

mdo avatar mdo commented on May 9, 2024

Nesting within a single form to use both horizontal and inline? Probably won't work in v3 honestly. If folks need horizontal form layouts, columns are their best bet.

from bootlint.

cvrebert avatar cvrebert commented on May 9, 2024

@mdo No, I mean that div.form-inline.form-group and div.form-horizontal.form-group are each invalid.

from bootlint.

mdo avatar mdo commented on May 9, 2024

Oh, yes, completely invalid. Apologies, I misread that part. You got it right.

from bootlint.

cvrebert avatar cvrebert commented on May 9, 2024

It's amazing, the random mistakes you find people making on StackOverflow...

from bootlint.

zacechola avatar zacechola commented on May 9, 2024

Would a different way to phrase this be .form-horizontal and .form-inline should only be applied to a form element?

var badFormHorizontal = $('.form-horizontal').not('form.form-horizontal');

The above would catch more than div.form-horizontal.form-group, etc.

Added a jsbin: http://jsbin.com/riqozeci/1/edit?html,js,output

from bootlint.

cvrebert avatar cvrebert commented on May 9, 2024

I don't think we can/should mandate that. I can imagine people doing unusual but valid stuff like
form>div.form-inline+div.form-horizontal

from bootlint.

zacechola avatar zacechola commented on May 9, 2024

That example in particular could wreak havoc on the form*, but I see your general point. I'm trying to come up with a query that will be a bit more greedy so we're not linting every possible mutation of misplaced classes.

Either way, in this case, the docs are sort of explicit on it. Add .form-inline and .form-horizontal to <form>.

*Columns would be the appropriate suggestion for a <form> that has both .form-horizontal and .form-inline children. Which, honestly, is a question that seems to come up a lot on its own on both SO and in IRC.

from bootlint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.