BootstrapのCSSを用いる際にclassを一括指定したい
現在、オフィシャルサイトの記述のような形でclassに値を設定しています:
<form>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
</div>
<div class="form-group">
<label for="exampleInputFile">File input</label>
<input type="file" id="exampleInputFile">
<p class="help-block">Example block-level help text here.</p>
</div>
...
</form>
このとき、 <form>直下の<div>には常にclass="form-group"を、また、その直下の<input>には常にclass="form-control"を設定する必要があることがわかっている場合、これらをhtml/css側で(つまり、javascriptを使用せずに)一括して指定することは可能でしょうか?
以下は私の勝手なイメージですが、このようにcssで継承関係的なものが表せる方法があるのでは…と考えましたが見つけることができませんでした。
form > div {
parent: .form-group;
...(追加の指定)...;
> input {
parent: .form-control;
...(追加の指定)...;
}