Comments (7)
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.
@mdo No, I mean that div.form-inline.form-group
and div.form-horizontal.form-group
are each invalid.
from bootlint.
Oh, yes, completely invalid. Apologies, I misread that part. You got it right.
from bootlint.
It's amazing, the random mistakes you find people making on StackOverflow...
from bootlint.
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.
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.
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)
- Switch to npm scripts
- Fix coverage HOT 3
- Different html input on Travis and on Windows HOT 1
- W012 isn't necessarily true in Bootstrap 4 HOT 3
- E013 doesn't allow cols with dynamic size HOT 2
- Bootstrap modal options manipulation issue after initialisation. HOT 2
- Direct input causes Oops HOT 1
- remove W002 as no longer needed HOT 4
- Update cheerio to the latest 1.0.0-rc.2 HOT 1
- tag new release HOT 2
- [v1] End spurt
- [v1] (Possible) checks to be added HOT 7
- [v1] Progress of Bootlint for Bootstrap v4+
- Add warning if sanitize is set to false HOT 1
- bootlint.com is offline HOT 1
- Switch to GitHub Actions CI
- Remove bluebird dependency
- Remove the express app
- Use rollup + babel
- Online validator
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootlint.