UNPKG

jiro-ui

Version:

A Mithril.js UI library based from construct-ui

205 lines (204 loc) 7.77 kB
.cui-input { position: relative; display: inline-flex; vertical-align: middle; background: white; } .cui-input input, .cui-input textarea { padding: 0 12px; font-size: 14px; height: 40px; min-height: 40px; line-height: 40px; } .cui-input input:not(:first-child), .cui-input textarea:not(:first-child) { padding-left: 36px; } .cui-input input:not(:last-child), .cui-input textarea:not(:last-child) { padding-right: 36px; } .cui-input > .cui-button:first-child:not(input), .cui-input > .cui-spinner:first-child:not(input), .cui-input > .cui-icon:first-child:not(input), .cui-input > .cui-tag:first-child:not(input) { margin-left: 12px; } .cui-input > .cui-button:last-child, .cui-input > .cui-spinner:last-child, .cui-input > .cui-icon:last-child, .cui-input > .cui-tag:last-child { margin-right: 12px; } .cui-input > .cui-button { padding: 0 6px; font-size: 11px; height: 28px; min-height: 28px; line-height: 28px; } .cui-input input, .cui-input textarea { border: solid 1px #c5cdd1; } .cui-input input:focus, .cui-input textarea:focus { border: solid 1px #5360ad; } .cui-input input, .cui-input textarea { position: relative; width: 100%; background: transparent; outline: none; color: #37474f; border-radius: 3px; box-shadow: 0px 1px 0px #eef1f2; transition: border 200ms cubic-bezier(0.4, 1, 0.75, 0.9), background 200ms cubic-bezier(0.4, 1, 0.75, 0.9), color 200ms cubic-bezier(0.4, 1, 0.75, 0.9); } .cui-input input::placeholder, .cui-input textarea::placeholder { color: #b0bec5; } .cui-input input:focus::placeholder, .cui-input textarea:focus::placeholder { color: #90a4ae; } .cui-input input::-ms-clear, .cui-input textarea::-ms-clear { display: none; } .cui-input > .cui-button, .cui-input > .cui-spinner, .cui-input > .cui-icon, .cui-input > .cui-tag { position: absolute; top: 50%; transform: translateY(-50%); margin: 0; z-index: 1; } .cui-input > .cui-button:first-child, .cui-input > .cui-spinner:first-child, .cui-input > .cui-icon:first-child, .cui-input > .cui-tag:first-child { left: 0; } .cui-input > .cui-button:last-child, .cui-input > .cui-spinner:last-child, .cui-input > .cui-icon:last-child, .cui-input > .cui-tag:last-child { right: 0; } .cui-input.cui-xs input, .cui-input.cui-xs textarea { padding: 0 10px; font-size: 12px; height: 30px; min-height: 30px; line-height: 30px; } .cui-input.cui-xs input:not(:first-child), .cui-input.cui-xs textarea:not(:first-child) { padding-left: 30px; } .cui-input.cui-xs input:not(:last-child), .cui-input.cui-xs textarea:not(:last-child) { padding-right: 30px; } .cui-input.cui-xs > .cui-button:first-child:not(input), .cui-input.cui-xs > .cui-spinner:first-child:not(input), .cui-input.cui-xs > .cui-icon:first-child:not(input), .cui-input.cui-xs > .cui-tag:first-child:not(input) { margin-left: 10px; } .cui-input.cui-xs > .cui-button:last-child, .cui-input.cui-xs > .cui-spinner:last-child, .cui-input.cui-xs > .cui-icon:last-child, .cui-input.cui-xs > .cui-tag:last-child { margin-right: 10px; } .cui-input.cui-xs > .cui-button { padding: 0 5px; font-size: 10px; height: 21px; min-height: 21px; line-height: 21px; } .cui-input.cui-sm input, .cui-input.cui-sm textarea { padding: 0 11px; font-size: 13px; height: 35px; min-height: 35px; line-height: 35px; } .cui-input.cui-sm input:not(:first-child), .cui-input.cui-sm textarea:not(:first-child) { padding-left: 33px; } .cui-input.cui-sm input:not(:last-child), .cui-input.cui-sm textarea:not(:last-child) { padding-right: 33px; } .cui-input.cui-sm > .cui-button:first-child:not(input), .cui-input.cui-sm > .cui-spinner:first-child:not(input), .cui-input.cui-sm > .cui-icon:first-child:not(input), .cui-input.cui-sm > .cui-tag:first-child:not(input) { margin-left: 11px; } .cui-input.cui-sm > .cui-button:last-child, .cui-input.cui-sm > .cui-spinner:last-child, .cui-input.cui-sm > .cui-icon:last-child, .cui-input.cui-sm > .cui-tag:last-child { margin-right: 11px; } .cui-input.cui-sm > .cui-button { padding: 0 5px; font-size: 10px; height: 25px; min-height: 25px; line-height: 25px; } .cui-input.cui-lg input, .cui-input.cui-lg textarea { padding: 0 14px; font-size: 16px; height: 45px; min-height: 45px; line-height: 45px; } .cui-input.cui-lg input:not(:first-child), .cui-input.cui-lg textarea:not(:first-child) { padding-left: 42px; } .cui-input.cui-lg input:not(:last-child), .cui-input.cui-lg textarea:not(:last-child) { padding-right: 42px; } .cui-input.cui-lg > .cui-button:first-child:not(input), .cui-input.cui-lg > .cui-spinner:first-child:not(input), .cui-input.cui-lg > .cui-icon:first-child:not(input), .cui-input.cui-lg > .cui-tag:first-child:not(input) { margin-left: 14px; } .cui-input.cui-lg > .cui-button:last-child, .cui-input.cui-lg > .cui-spinner:last-child, .cui-input.cui-lg > .cui-icon:last-child, .cui-input.cui-lg > .cui-tag:last-child { margin-right: 14px; } .cui-input.cui-lg > .cui-button { padding: 0 7px; font-size: 13px; height: 32px; min-height: 32px; line-height: 32px; } .cui-input.cui-xl input, .cui-input.cui-xl textarea { padding: 0 16px; font-size: 18px; height: 50px; min-height: 50px; line-height: 50px; } .cui-input.cui-xl input:not(:first-child), .cui-input.cui-xl textarea:not(:first-child) { padding-left: 48px; } .cui-input.cui-xl input:not(:last-child), .cui-input.cui-xl textarea:not(:last-child) { padding-right: 48px; } .cui-input.cui-xl > .cui-button:first-child:not(input), .cui-input.cui-xl > .cui-spinner:first-child:not(input), .cui-input.cui-xl > .cui-icon:first-child:not(input), .cui-input.cui-xl > .cui-tag:first-child:not(input) { margin-left: 16px; } .cui-input.cui-xl > .cui-button:last-child, .cui-input.cui-xl > .cui-spinner:last-child, .cui-input.cui-xl > .cui-icon:last-child, .cui-input.cui-xl > .cui-tag:last-child { margin-right: 16px; } .cui-input.cui-xl > .cui-button { padding: 0 8px; font-size: 15px; height: 35px; min-height: 35px; line-height: 35px; } .cui-input.cui-primary input, .cui-input.cui-primary textarea { border: solid 1px #5360ad; } .cui-input.cui-primary input:focus, .cui-input.cui-primary textarea:focus { border: solid 1px #4a569a; } .cui-input.cui-positive input, .cui-input.cui-positive textarea { border: solid 1px #3d8c40; } .cui-input.cui-positive input:focus, .cui-input.cui-positive textarea:focus { border: solid 1px #357b38; } .cui-input.cui-negative input, .cui-input.cui-negative textarea { border: solid 1px #dc3c31; } .cui-input.cui-negative input:focus, .cui-input.cui-negative textarea:focus { border: solid 1px #c3362b; } .cui-input.cui-warning input, .cui-input.cui-warning textarea { border: solid 1px #dd7000; } .cui-input.cui-warning input:focus, .cui-input.cui-warning textarea:focus { border: solid 1px #c46300; } .cui-input.cui-disabled input, .cui-input.cui-disabled textarea, .cui-input.cui-disabled .cui-button, .cui-input.cui-disabled .cui-icon { cursor: not-allowed; pointer-events: none; } .cui-input.cui-basic input, .cui-input.cui-basic input:focus, .cui-input.cui-basic textarea, .cui-input.cui-basic textarea:focus { border-top: none; border-left: none; border-right: none; border-radius: 0; background: transparent; }