signatures.css 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. .compiled-signatures {
  2. display: flex;
  3. flex-wrap: wrap;
  4. gap: 2rem;
  5. justify-content: space-around;
  6. /* padding-block-end: 0.5rem; */
  7. /* padding-inline: clamp(0rem,2vw,1rem); */
  8. }
  9. .compiled-signature {
  10. display: grid;
  11. /* grid-template-columns: min-content 1fr; */
  12. font-size: 0.75em;
  13. align-items: start;
  14. /* min-width: 50%; */
  15. max-width: min(50%, 330px);
  16. min-width: 300px;
  17. max-width: clamp(50% - 2rem, 348px, 100%);
  18. min-width: 200px;
  19. }
  20. .compiled-signature img {
  21. background: #fff;
  22. border: 1px solid rgba(3,33,48,.25);
  23. margin-block: 0.15rem;
  24. }
  25. #dev_signature,
  26. #hk {
  27. display: block;
  28. max-width: min(333px, 100%);
  29. max-width: min(370px,100%);
  30. }
  31. #dev_signature[src="null"] {
  32. display: none;
  33. }
  34. .date-ip {
  35. font-size: 1.2em;
  36. line-height: 1.2em;
  37. letter-spacing: .025em;
  38. font-family: "Open Sans Condensed", sans-serif;
  39. font-weight: 400;
  40. font-family: "Open Sans", sans-serif;
  41. font-variation-settings: "wdth" 75;
  42. /* font-weight: 600; */
  43. }
  44. #ui-unsigned {
  45. margin: 0;
  46. margin-block-start: var(--flow-space,1.5rem);
  47. }
  48. #ui-signed {
  49. clear: both;
  50. }
  51. #content > *:not(#ui-unsigned, #dev_signature) {
  52. transition: opacity .3s ease-out;
  53. }
  54. /***/
  55. #signature-container {
  56. display: grid;
  57. place-items: start;
  58. gap: 1.5rem;
  59. /* padding: clamp(0.25rem, 1.5rem, 2rem); */
  60. @media (min-width: 40rem) {
  61. place-items: end;
  62. }
  63. }
  64. #canvas-container {
  65. aspect-ratio: 188/58.66;
  66. background: #fff;
  67. isolation: isolate;
  68. position: relative;
  69. user-select: none;
  70. width: 100%;
  71. max-width: 100%;
  72. transition:
  73. max-width .4s cubic-bezier(0.22, 1, 0.36, 1),
  74. margin .6s ease-in-out;
  75. }
  76. /* Horizontal line in signature */
  77. #canvas-container::before {
  78. content: "";
  79. display: block;
  80. position: absolute;
  81. inset: 70% 7.5% 0 7.5%;
  82. height: 0;
  83. border-bottom: solid 2px #61594F;
  84. z-index: -1;
  85. opacity: .95;
  86. pointer-events: none;
  87. }
  88. @media (max-width:40em) {
  89. #canvas-container {
  90. aspect-ratio: 200/80;
  91. }
  92. /* #canvas-container::before {
  93. inset: 80% 7.5% 0 7.5%;
  94. } */
  95. }
  96. #signature-pad,
  97. #generator-signature-pad {
  98. position: absolute;
  99. left: 0;
  100. top: 0;
  101. width: 100%;
  102. height: 100%;
  103. border: dashed 2px hsl(200 90% 10%/0.75);
  104. box-shadow: 0 0 5px 1px #ddd inset;
  105. }
  106. #signature-controls {
  107. display: flex;
  108. flex-direction: row;
  109. gap: 1.5rem;
  110. align-items: flex-start;
  111. justify-content: center;
  112. width: 100%;
  113. }
  114. /***/
  115. .loading-signed {
  116. /* display: flex; */
  117. /* display: none; */
  118. align-items: center;
  119. justify-content: center;
  120. @media (min-width: 40rem) {
  121. justify-content: center;
  122. }
  123. }
  124. .loading-signed:not(.hidden) {
  125. display: flex;
  126. }
  127. .to-go {
  128. opacity: 1;
  129. transform: none;
  130. transition:
  131. all .2s cubic-bezier(0.26, 0.53, 0.74, 1.48),
  132. scale 1s ease-out;
  133. }
  134. /* Client submitted signature */
  135. .to-go.gone {
  136. opacity: 0;
  137. transform: translate(0, -20px);
  138. }
  139. #canvas-container.just-signed {
  140. max-width: 333px;
  141. @media (min-width: 40rem) {
  142. margin-top: -100%;
  143. margin-top: calc(-330px - 2rem);
  144. }
  145. & #signature-pad {
  146. border: 1px dashed rgba(3,33,48,.25);
  147. box-shadow: inset 0 0 2px 1px hsl(0deg 0% 87% / 25%);
  148. }
  149. &::before {
  150. opacity: 0;
  151. }
  152. }