main.css 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. @import url('./transitions.css');
  2. @config './tailwind.desktop.js';
  3. @tailwind base;
  4. @tailwind components;
  5. @tailwind utilities;
  6. @layer base {
  7. /* Override autofill styles in Firefox. */
  8. :-moz-autofill {
  9. background: transparent;
  10. }
  11. /* Override autofill styles in Webkit-based browsers. */
  12. :-webkit-autofill {
  13. -webkit-text-fill-color: theme('colors.black');
  14. -webkit-background-clip: text;
  15. caret-color: theme('colors.black');
  16. }
  17. [data-theme='dark'] :-webkit-autofill {
  18. -webkit-text-fill-color: theme('colors.white');
  19. caret-color: theme('colors.white');
  20. }
  21. /* No-op animation for hooking into autofill mechanism in Webkit-based browsers. */
  22. :-webkit-autofill {
  23. animation-name: onAutoFillStart;
  24. }
  25. :not(:-webkit-autofill) {
  26. animation-name: onAutoFillEnd;
  27. }
  28. /* Better-looking typography on high-density screens. */
  29. body {
  30. @apply antialiased;
  31. }
  32. a {
  33. @apply outline-none focus-visible:outline-1 focus-visible:outline-offset-1 focus-visible:outline-blue-800;
  34. }
  35. @keyframes onAutoFillStart {
  36. from {
  37. }
  38. to {
  39. }
  40. }
  41. @keyframes onAutoFillEnd {
  42. from {
  43. }
  44. to {
  45. }
  46. }
  47. }
  48. @layer components {
  49. .grid-cols-2-uneven > *:nth-last-child(1):nth-child(odd) {
  50. grid-column: span 2;
  51. }
  52. input::placeholder,
  53. textarea::placeholder {
  54. @apply text-stone-200 dark:text-neutral-500;
  55. }
  56. .required::after {
  57. @apply inline-block font-extrabold text-yellow-600 content-['•'] ltr:ml-1 rtl:mr-1;
  58. }
  59. /*
  60. Responsive multi-column mode for form groups:
  61. - compatibility layer for object attributes and form columns via legacy `.formGroup--halfSize` class
  62. - container query via optional TW `@container/form-group` class
  63. */
  64. .form-group .formkit-outer {
  65. /* stylelint-disable-next-line scss/operator-no-unspaced */
  66. @apply @lg/form-group:col-span-1 col-span-2;
  67. /* Optional full-width style for specific fields. */
  68. &[data-type='editor'],
  69. &[data-type='file'],
  70. &:last-of-type:nth-of-type(odd) {
  71. /* stylelint-disable-next-line scss/operator-no-unspaced */
  72. @apply @lg/form-group:col-span-2;
  73. }
  74. &.form-group-single-column {
  75. @apply col-span-1;
  76. }
  77. }
  78. /*
  79. Use specific selector for dirty flag styling due to nested FormKit fields.
  80. */
  81. .form-group.form-group-mark-dirty
  82. > .formkit-outer[data-dirty]
  83. > .formkit-block
  84. > .formkit-wrapper
  85. > .formkit-inner {
  86. @apply relative;
  87. &::before {
  88. @apply absolute bottom-0 top-0 w-2 rounded-es-lg rounded-ss-lg content-[''] ltr:left-0 rtl:right-0;
  89. background: repeating-linear-gradient(
  90. 45deg,
  91. theme(colors.white),
  92. theme(colors.white) 5px,
  93. transparent 5px,
  94. transparent 10px
  95. )
  96. repeat center;
  97. mask-image: linear-gradient(
  98. 90deg,
  99. theme(colors.black),
  100. theme(colors.black) 0.4rem,
  101. transparent 0.4rem,
  102. transparent
  103. );
  104. [data-theme='dark'] & {
  105. background: repeating-linear-gradient(
  106. 45deg,
  107. theme(colors.gray.200),
  108. theme(colors.gray.200) 5px,
  109. transparent 5px,
  110. transparent 10px
  111. )
  112. repeat center;
  113. }
  114. }
  115. }
  116. .tooltip {
  117. @apply fixed z-50 w-fit -translate-y-2 select-none text-wrap rounded-md border border-neutral-100 bg-blue-200 px-2 py-1 text-xs leading-snug text-gray-100 opacity-0 transition-all dark:border-gray-900 dark:bg-gray-700 dark:text-neutral-400;
  118. &-animate {
  119. @apply translate-y-0 opacity-100;
  120. }
  121. }
  122. /*
  123. Editor content styles
  124. */
  125. .Content,
  126. .ProseMirror {
  127. div[data-signature-marker] {
  128. display: none;
  129. }
  130. &:focus-visible {
  131. outline: none;
  132. }
  133. blockquote {
  134. @apply border-l-4 border-l-gray-200 px-3 py-2;
  135. }
  136. ol {
  137. list-style: decimal;
  138. }
  139. ul {
  140. list-style: disc;
  141. }
  142. ol,
  143. ul {
  144. @apply pb-2;
  145. padding-inline-start: theme('spacing.2');
  146. list-style-position: inside;
  147. p {
  148. display: inline;
  149. }
  150. }
  151. h1 {
  152. @apply mb-1 mt-2 text-2xl font-bold;
  153. }
  154. h2 {
  155. @apply mb-1 mt-2 text-xl font-bold;
  156. }
  157. h3 {
  158. @apply mb-1 mt-2 text-lg font-bold;
  159. }
  160. a {
  161. @apply text-blue-800;
  162. }
  163. [dir='rtl'] {
  164. text-align: right;
  165. }
  166. [dir='ltr'] {
  167. text-align: left;
  168. }
  169. }
  170. .bg-stripes::before {
  171. content: '';
  172. background-image: repeating-linear-gradient(
  173. 45deg,
  174. theme('colors.blue.400'),
  175. theme('colors.blue.400') 5px,
  176. theme('colors.blue.700') 5px,
  177. theme('colors.blue.700') 10px
  178. );
  179. height: calc(100% + 10px);
  180. width: calc(100% + 10px);
  181. left: -5px;
  182. top: -5px;
  183. position: absolute;
  184. z-index: -10;
  185. }
  186. [data-theme='dark'] .bg-stripes::before {
  187. background-image: repeating-linear-gradient(
  188. 45deg,
  189. theme('colors.blue.700'),
  190. theme('colors.blue.700') 5px,
  191. theme('colors.blue.900') 5px,
  192. theme('colors.blue.900') 10px
  193. );
  194. }
  195. }
  196. @layer utilities {
  197. .group-block {
  198. @apply rounded-3xl bg-neutral-50 p-5 text-black dark:bg-gray-500 dark:text-white;
  199. }
  200. .backface-hidden {
  201. backface-visibility: hidden;
  202. }
  203. @media print {
  204. [data-print-mode='true'] body {
  205. @apply invisible;
  206. .print-area {
  207. @apply visible fixed inset-0;
  208. }
  209. }
  210. }
  211. }