UNPKG

@buun_group/brutalist-ui

Version:
205 lines (170 loc) 4.21 kB
/* Container */ .container { display: inline-flex; gap: var(--brutal-space-2); align-items: center; } /* Size specific gaps */ .container.sm { gap: var(--brutal-space-1); } .container.md { gap: var(--brutal-space-2); } .container.lg { gap: var(--brutal-space-3); } /* Base Input Styles */ .input { font-family: var(--brutal-font-mono); font-weight: var(--brutal-font-bold); background-color: var(--brutal-white); color: var(--brutal-black); border: var(--brutal-border-width) var(--brutal-border-style) var(--brutal-black); outline: none; transition: var(--brutal-transition-base); text-align: center; cursor: text; caret-color: var(--brutal-black); } /* Remove default number input spinners */ .input::-webkit-inner-spin-button, .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } .input[type="number"] { -moz-appearance: textfield; } /* Sizes */ .input.sm { width: 36px; height: 36px; font-size: var(--brutal-text-lg); line-height: 1; } .input.md { width: 48px; height: 48px; font-size: var(--brutal-text-xl); line-height: 1; } .input.lg { width: 56px; height: 56px; font-size: var(--brutal-text-2xl); line-height: 1; } /* Variants */ .input.default { border-color: var(--brutal-black); } .input.error { border-color: var(--brutal-error); background-color: rgba(255, 0, 0, 0.05); } .input.success { border-color: var(--brutal-success); background-color: rgba(0, 255, 0, 0.05); } /* States */ .input:focus { border-color: var(--brutal-black); background-color: var(--brutal-gray-50); } .input.withShadow:focus { transform: translate(-2px, -2px); box-shadow: 6px 6px 0px var(--brutal-black); } .input.error:focus { border-color: var(--brutal-error); background-color: rgba(255, 0, 0, 0.08); } .input.error.withShadow:focus { box-shadow: 6px 6px 0px var(--brutal-error); } .input.success:focus { border-color: var(--brutal-success); background-color: rgba(0, 255, 0, 0.08); } .input.success.withShadow:focus { box-shadow: 6px 6px 0px var(--brutal-success); } /* Hover state */ .input:hover:not(:disabled):not(:focus) { border-color: var(--brutal-gray-700); background-color: var(--brutal-gray-50); } .input.error:hover:not(:disabled):not(:focus) { border-color: var(--brutal-accent-dark); } .input.success:hover:not(:disabled):not(:focus) { border-color: var(--brutal-success-dark); } /* Filled state */ .input.filled { background-color: var(--brutal-yellow); font-weight: var(--brutal-font-black); } .input.filled:hover:not(:disabled):not(:focus) { background-color: var(--brutal-yellow-light); } .input.filled:focus { background-color: var(--brutal-yellow); } /* Shadow effect */ .withShadow { box-shadow: var(--brutal-shadow-sm); } /* Disabled state */ .input:disabled, .input.disabled { opacity: 0.6; cursor: not-allowed; background-color: var(--brutal-gray-100); } /* Placeholder styling */ .input::placeholder { color: var(--brutal-gray-400); opacity: 1; font-weight: var(--brutal-font-medium); } /* Selection styling */ .input::selection { background-color: var(--brutal-yellow); color: var(--brutal-black); } /* Autofill styles */ .input:-webkit-autofill, .input:-webkit-autofill:hover, .input:-webkit-autofill:focus { -webkit-text-fill-color: var(--brutal-black); -webkit-box-shadow: 0 0 0px 1000px var(--brutal-white) inset; transition: background-color 5000s ease-in-out 0s; } .input.filled:-webkit-autofill, .input.filled:-webkit-autofill:hover, .input.filled:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0px 1000px var(--brutal-yellow) inset; } .input.error:-webkit-autofill, .input.error:-webkit-autofill:hover, .input.error:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0px 1000px rgba(255, 0, 0, 0.05) inset; } .input.success:-webkit-autofill, .input.success:-webkit-autofill:hover, .input.success:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0px 1000px rgba(0, 255, 0, 0.05) inset; } /* Responsive adjustments */ @media (max-width: 480px) { .container.lg { gap: var(--brutal-space-2); } .input.lg { width: 48px; height: 48px; font-size: var(--brutal-text-xl); } }