forms.css 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* https://codepen.io/nonsalant/pen/zYaqjpK/a4a3062d9ebde51f31d0f29fdc276eed */
  2. /* text-like inputs and textarea styles */
  3. :where(input:is([type="text"], [type="email"], [type="password"]), textarea) {
  4. transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  5. font-size: 1rem;
  6. font-weight: 400;
  7. box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1),
  8. 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  9. padding-block: 0.35rem;
  10. padding-inline: 0.75rem;
  11. border-radius: 0.25rem;
  12. appearance: none;
  13. position: relative;
  14. outline-offset: 0;
  15. outline-width: 1.5px;
  16. color: hsl(var(--clr-dark-hsl) / 1);
  17. background-color: hsl(var(--clr-light-hsl) / 0.6);
  18. background-color: hsl(var(--clr-light-hsl) / 1);
  19. /* background-color: red; */
  20. border: solid 1.5px hsl(var(--clr-dark-hsl) / 0.5);
  21. mix-blend-mode: luminosity;
  22. &:focus {
  23. color: hsl(var(--clr-darker-hsl) / 1);
  24. background-color: hsl(var(--clr-light-hsl) / 1);
  25. border: solid 1.5px hsl(var(--clr-darker-hsl) / 0.8);
  26. /* outline-color: hsl(var(--clr-darker-hsl) / 0.8); */
  27. }
  28. /* &:focus:not(:focus-visible) {
  29. outline: 0 !important;
  30. } */
  31. &::placeholder {
  32. color: hsl(var(--clr-dark-hsl) / 0.75);
  33. }
  34. &:focus::placeholder {
  35. color: hsl(var(--clr-dark-hsl) / 0.75);
  36. }
  37. /* &:-internal-autofill-selected {
  38. filter: invert(1) hue-rotate(180deg);
  39. border: solid 1.5px hsl(var(--clr-light-hsl) / 0.1);
  40. outline-color: hsl(var(--clr-light-hsl));
  41. box-shadow: unset;
  42. } */
  43. }
  44. label {
  45. font-weight: 600;
  46. letter-spacing: -.0175em;
  47. color: var(--clr-blue-desaturated-700);
  48. }
  49. label:has(svg) {
  50. display: flex;
  51. justify-content: center;
  52. align-items: center;
  53. column-gap: .25em;
  54. /* margin-inline-start: -.9rem; */
  55. svg {
  56. width: 1.5rem;
  57. height: 1.5rem;
  58. color: var(--clr-blue-700);
  59. }
  60. }
  61. /**/
  62. /* .panel > small {
  63. display: block;
  64. opacity: 75%;
  65. text-wrap: balance;
  66. line-height: 1.75;
  67. font-weight: 600;
  68. } */