What is the specificity of the attribute selector?
Attribute selectors are equally specific to class selectors.
In your example, the first selector is more specific because there is an additional type selector input
that causes it to beat the second selector.
The specificity of each selector is calculated as follows:
/* 1 class, 1 attribute, 1 type -> specificity = 0-2-1 */
.selectform input[type="text"] { }
/* 2 classes -> specificity = 0-2-0 */
.selectform .inputbg { }