@import 'css/romo/vars'; @import 'css/romo/mixins'; .romo { /* defaults */ form { @include rm-push; @include rm-pad; } label { display: block; } /* basic */ .romo-form fieldset { @include rm-push; @include rm-pad; @include rm-border; } .romo-form legend { display: block; width: 100%; @include rm-push; @include rm-pad; @include push0-bottom; @include rm-border; @include border1-bottom; } .romo-form input, .romo-form select, .romo-form textarea, input.romo-select-dropdown-option-filter { font-size: 100%; @include rm-push; @include align-middle; } .romo-form label.romo-radio, .romo-form label.romo-checkbox { span, input[type="radio"], input[type="checkbox"] { line-height: 1; @include align-middle; } } .romo-form input, input.romo-select-dropdown-option-filter { *overflow: visible; line-height: normal; } .romo-form textarea { overflow: auto; @include align-top; } .romo-form label, .romo-form select, .romo-form input[type="button"], .romo-form input[type="reset"], .romo-form input[type="submit"], .romo-form input[type="radio"], .romo-form input[type="checkbox"] { cursor: pointer; } .romo-form input[disabled], .romo-form select[disabled], .romo-form textarea[disabled], .romo-form input[readonly], .romo-form select[readonly], .romo-form textarea[readonly], input.romo-select-dropdown-option-filter[disabled], input.romo-select-dropdown-option-filter[readonly] { cursor: $notAllowedCursor; } .romo-form select { font-weight: normal; background-color: $inputBgColor; @include border1; } .romo-form select optgroup { @include select-optgroup; } .romo-form select option { @include select-option; } .romo-form textarea, .romo-form input[type="text"], .romo-form input[type="password"], .romo-form input[type="datetime"], .romo-form input[type="datetime-local"], .romo-form input[type="date"], .romo-form input[type="month"], .romo-form input[type="time"], .romo-form input[type="week"], .romo-form input[type="number"], .romo-form input[type="email"], .romo-form input[type="url"], .romo-form input[type="search"], .romo-form input[type="tel"], .romo-form input[type="color"], input.romo-select-dropdown-option-filter { font-weight: normal; background-color: $inputBgColor; @include border1; @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.075)); } /* see https://css-tricks.com/almanac/selectors/p/placeholder/ */ /* https://developer.mozilla.org/en-US/docs/Web/CSS/::placeholder */ .romo-form textarea::placeholder, .romo-form input[type="text"]::placeholder, .romo-form input[type="password"]::placeholder, .romo-form input[type="datetime"]::placeholder, .romo-form input[type="datetime-local"]::placeholder, .romo-form input[type="date"]::placeholder, .romo-form input[type="month"]::placeholder, .romo-form input[type="time"]::placeholder, .romo-form input[type="week"]::placeholder, .romo-form input[type="number"]::placeholder, .romo-form input[type="email"]::placeholder, .romo-form input[type="url"]::placeholder, .romo-form input[type="search"]::placeholder, .romo-form input[type="tel"]::placeholder, .romo-form input[type="color"]::placeholder, input.romo-select-dropdown-option-filter::placeholder { @include input-placeholder; } .romo-form textarea::-webkit-input-placeholder, /* Chrome/Opera/Safari */ .romo-form input[type="text"]::-webkit-input-placeholder, .romo-form input[type="password"]::-webkit-input-placeholder, .romo-form input[type="datetime"]::-webkit-input-placeholder, .romo-form input[type="datetime-local"]::-webkit-input-placeholder, .romo-form input[type="date"]::-webkit-input-placeholder, .romo-form input[type="month"]::-webkit-input-placeholder, .romo-form input[type="time"]::-webkit-input-placeholder, .romo-form input[type="week"]::-webkit-input-placeholder, .romo-form input[type="number"]::-webkit-input-placeholder, .romo-form input[type="email"]::-webkit-input-placeholder, .romo-form input[type="url"]::-webkit-input-placeholder, .romo-form input[type="search"]::-webkit-input-placeholder, .romo-form input[type="tel"]::-webkit-input-placeholder, .romo-form input[type="color"]::-webkit-input-placeholder, input.romo-select-dropdown-option-filter::-webkit-input-placeholder { @include input-placeholder; } .romo-form textarea::-moz-placeholder, /* Firefox 19+ */ .romo-form input[type="text"]::-moz-placeholder, .romo-form input[type="password"]::-moz-placeholder, .romo-form input[type="datetime"]::-moz-placeholder, .romo-form input[type="datetime-local"]::-moz-placeholder, .romo-form input[type="date"]::-moz-placeholder, .romo-form input[type="month"]::-moz-placeholder, .romo-form input[type="time"]::-moz-placeholder, .romo-form input[type="week"]::-moz-placeholder, .romo-form input[type="number"]::-moz-placeholder, .romo-form input[type="email"]::-moz-placeholder, .romo-form input[type="url"]::-moz-placeholder, .romo-form input[type="search"]::-moz-placeholder, .romo-form input[type="tel"]::-moz-placeholder, .romo-form input[type="color"]::-moz-placeholder, input.romo-select-dropdown-option-filter::-moz-placeholder { @include input-placeholder; } .romo-form textarea:-moz-placeholder, /* Firefox 18- */ .romo-form input[type="text"]:-moz-placeholder, .romo-form input[type="password"]:-moz-placeholder, .romo-form input[type="datetime"]:-moz-placeholder, .romo-form input[type="datetime-local"]:-moz-placeholder, .romo-form input[type="date"]:-moz-placeholder, .romo-form input[type="month"]:-moz-placeholder, .romo-form input[type="time"]:-moz-placeholder, .romo-form input[type="week"]:-moz-placeholder, .romo-form input[type="number"]:-moz-placeholder, .romo-form input[type="email"]:-moz-placeholder, .romo-form input[type="url"]:-moz-placeholder, .romo-form input[type="search"]:-moz-placeholder, .romo-form input[type="tel"]:-moz-placeholder, .romo-form input[type="color"]:-moz-placeholder, input.romo-select-dropdown-option-filter:-moz-placeholder { @include input-placeholder; } .romo-form textarea:-ms-input-placeholder, /* IE 10+ */ .romo-form input[type="text"]:-ms-input-placeholder, .romo-form input[type="password"]:-ms-input-placeholder, .romo-form input[type="datetime"]:-ms-input-placeholder, .romo-form input[type="datetime-local"]:-ms-input-placeholder, .romo-form input[type="date"]:-ms-input-placeholder, .romo-form input[type="month"]:-ms-input-placeholder, .romo-form input[type="time"]:-ms-input-placeholder, .romo-form input[type="week"]:-ms-input-placeholder, .romo-form input[type="number"]:-ms-input-placeholder, .romo-form input[type="email"]:-ms-input-placeholder, .romo-form input[type="url"]:-ms-input-placeholder, .romo-form input[type="search"]:-ms-input-placeholder, .romo-form input[type="tel"]:-ms-input-placeholder, .romo-form input[type="color"]:-ms-input-placeholder, input.romo-select-dropdown-option-filter:-ms-input-placeholder { @include input-placeholder; } .romo-form select:focus, .romo-form textarea:focus, .romo-form input[type="text"]:focus, .romo-form input[type="password"]:focus, .romo-form input[type="datetime"]:focus, .romo-form input[type="datetime-local"]:focus, .romo-form input[type="date"]:focus, .romo-form input[type="month"]:focus, .romo-form input[type="time"]:focus, .romo-form input[type="week"]:focus, .romo-form input[type="number"]:focus, .romo-form input[type="email"]:focus, .romo-form input[type="url"]:focus, .romo-form input[type="search"]:focus, .romo-form input[type="tel"]:focus, .romo-form input[type="color"]:focus, input.romo-select-dropdown-option-filter:focus { @include input-focus; } .romo-form input[disabled], .romo-form select[disabled], .romo-form textarea[disabled], .romo-form input[readonly], .romo-form select[readonly], .romo-form textarea[readonly], input.romo-select-dropdown-option-filter[disabled], input.romo-select-dropdown-option-filter[readonly] { background-color: $inputDisabledColor; } .romo-form input[type="radio"][disabled], .romo-form input[type="checkbox"][disabled], .romo-form input[type="radio"][readonly], .romo-form input[type="checkbox"][readonly] { background-color: transparent }; .romo-form select, .romo-form input[type="text"], .romo-form input[type="password"], .romo-form input[type="datetime"], .romo-form input[type="datetime-local"], .romo-form input[type="date"], .romo-form input[type="month"], .romo-form input[type="time"], .romo-form input[type="week"], .romo-form input[type="number"], .romo-form input[type="email"], .romo-form input[type="url"], .romo-form input[type="search"], .romo-form input[type="tel"], .romo-form input[type="color"], input.romo-select-dropdown-option-filter { height: $inputHeight; line-height: $baseLineHeight; @include align-middle; } input.romo-select-dropdown-option-filter { height: $inputFilterHeight; } .romo-form textarea, .romo-form input[type="text"], .romo-form input[type="password"], .romo-form input[type="datetime"], .romo-form input[type="datetime-local"], .romo-form input[type="date"], .romo-form input[type="month"], .romo-form input[type="time"], .romo-form input[type="week"], .romo-form input[type="number"], .romo-form input[type="email"], .romo-form input[type="url"], .romo-form input[type="search"], .romo-form input[type="tel"], .romo-form input[type="color"], input.romo-select-dropdown-option-filter { display: inline-block; padding: 4px 6px; color: $inputColor; } input.romo-select-dropdown-option-filter { display: block; width: 100%; } .romo-form textarea, .romo-form select[multiple], .romo-form select[size] { height: auto; } .romo-form input[type="file"] { height: ($baseLineHeight / 2) * 3; /* 30px */ line-height: ($baseLineHeight / 2) * 3; /* 30px */ } .romo-input, .romo-input1 { width: $inputSize1; } .romo-input-small, .romo-input0 { width: $inputSize0; } .romo-input-large, .romo-input2 { width: $inputSize2; } .romo-input-block { width: 100%; display: block; } .romo-form input[type="file"], .romo-form input[type="image"], .romo-form input[type="submit"], .romo-form input[type="reset"], .romo-form input[type="button"], .romo-form input[type="radio"], .romo-form input[type="checkbox"] { width: auto; } .romo-form .romo-input-inline, .romo-form .romo-input-help { line-height: $inputHeight; @include align-middle; } }