twbs/bootstrap

add new tool's classes ".h-input" (.bg-disabled, .text-input) to allow DIVs look like INPUTs

rpokrovskij opened this issue · 2 comments

.h-input{
  min-height: $input-height !important; 
}

.bg-disabled{
   background-color: $input-disabled-bg !important; 
}

.text-input{
   color: $input-color !important;
}

this is usefull when you want to make "input field emulation" (e.g."multiselect") using "div" panel that "looks like input" and want to prevent its collapse when it is empty (be disabled with standard color and reuse input color).

create DIV panels that "looks like input" is quite common situation for plugin developers.

E.g.

image

mdo commented

Thanks for the suggestion, but we'll pass on it for now.

So what is your suggestion on how to set "input height" variable for div panel in plugin code? as plugin developer I can't relly on #{$input-height} (even if the scss is distributed with plugin) - there is no way to get user's customized value.

We need some important variables published as classes. Currently you publish it as input.form-control class height style but IT CAN"T BE ASSIGNED to div, and this is the problem. do it more generic at least.