base.css 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. /* global base styles */
  2. @layer base {
  3. html,
  4. body{
  5. background-color: #b19fb3;
  6. @apply h-screen
  7. }
  8. a{
  9. @apply text-purple-400 font-semibold underline;
  10. }
  11. a[rel] {
  12. @apply whitespace-nowrap;
  13. }
  14. blockquote cite {
  15. display: block;
  16. }
  17. h1,
  18. h2,
  19. h3,
  20. h4,
  21. h5,
  22. h6,
  23. #site-title {
  24. @apply font-bold font-mono;
  25. }
  26. h1 {
  27. @apply text-3xl;
  28. }
  29. h2 {
  30. @apply text-2xl;
  31. }
  32. h3 {
  33. @apply text-xl;
  34. }
  35. h4 {
  36. @apply text-lg;
  37. }
  38. textarea {
  39. @apply w-full h-24 p-2 bg-white border border-gray-400 rounded;
  40. }
  41. ol {
  42. @apply list-decimal list-inside;
  43. }
  44. ul {
  45. @apply list-disc list-inside;
  46. }
  47. li > ol,
  48. li > ul {
  49. @apply pl-4;
  50. }
  51. pre {
  52. @apply w-full my-2 p-2 bg-gray-50 rounded;
  53. }
  54. code {
  55. @apply inline-block px-1 bg-gray-50 rounded-sm;
  56. }
  57. hr {
  58. @apply w-full border-gray-700 mt-4 mb-2;
  59. }
  60. .form {
  61. /* filler */
  62. }
  63. .form label {
  64. @apply block text-lg font-semibold;
  65. }
  66. .form label .desc {
  67. @apply text-xs lowercase;
  68. }
  69. .form label .desc::before {
  70. content: "(";
  71. }
  72. .form label .desc::after {
  73. content: ")";
  74. }
  75. .form input,
  76. .form select {
  77. @apply inline-block w-full max-w-screen-lg border border-gray-400 rounded;
  78. }
  79. .form .input-prefix {
  80. @apply flex w-full max-w-screen-lg border border-gray-400 rounded overflow-hidden;
  81. }
  82. .form .input-prefix::before {
  83. @apply bg-gray-200 pl-2 pr-1;
  84. content: attr(data-prefix);
  85. }
  86. .form .input-prefix input {
  87. @apply border-none rounded-none;
  88. }
  89. /* tables */
  90. table {
  91. @apply w-full bg-purple-200 border-2;
  92. }
  93. table a {
  94. @apply text-black;
  95. }
  96. table thead,
  97. table tbody,
  98. table thead tr,
  99. table tbody tr {
  100. @apply flex w-full;
  101. }
  102. table thead {
  103. @apply bg-gray-100 border-b-2 border-black;
  104. }
  105. table thead th {
  106. @apply text-left;
  107. }
  108. table tbody {
  109. @apply flex-col items-center justify-between overflow-y-auto max-h-80;
  110. }
  111. table thead tr *,
  112. table tbody tr * {
  113. @apply flex-1;
  114. }
  115. table tbody tr:nth-child(even){
  116. @apply bg-purple-100;
  117. }
  118. table tbody tr{
  119. @apply hover:bg-white;
  120. }
  121. table thead th:first-child,
  122. table tbody td:first-child {
  123. @apply pl-2;
  124. }
  125. table thead th:last-child,
  126. table tbody td:last-child {
  127. @apply pr-2;
  128. }
  129. }
  130. @layer components {
  131. /* standard classes */
  132. .btn {
  133. @apply inline-block bg-white p-2 border border-black rounded text-black font-normal no-underline;
  134. }
  135. .panel {
  136. @apply w-full my-2 border border-black p-2 rounded bg-gray-200 relative;
  137. }
  138. .fullscreen {
  139. @apply block w-screen h-screen;
  140. }
  141. /* wrap an image such that it is only minimally scaled to fit a desired area. */
  142. /* actual size it left to be applied to the element. */
  143. .image-wrapper {
  144. @apply inline-block items-center justify-items-center overflow-hidden;
  145. }
  146. .image-wrapper img {
  147. @apply w-full h-full object-cover;
  148. }
  149. /* Navbar styles */
  150. #sidebar
  151. {
  152. @apply w-screen xl:w-1/6 lg:max-w-xs bg-pink-500 border-r border-black;
  153. background-image: linear-gradient(to bottom, rgba(123,100,127,0) 0%, rgba(123,100,127,0.25) 5%, rgba(123,100,127,0.75) 25%, rgba(123,100,127,1) 90%), url("/imgs/hex_500_1000_10.png");
  154. }
  155. #sidebar h1,
  156. #sidebar div,
  157. #sidebar p {
  158. @apply mx-auto my-4 px-6 py-4 bg-opacity-50 bg-white rounded text-center;
  159. }
  160. #sidebar h1 {
  161. @apply w-max bg-opacity-70;
  162. }
  163. #sidebar p,
  164. #sidebar div {
  165. @apply mx-8;
  166. }
  167. #sidebar #site-title {
  168. @apply text-3xl;
  169. }
  170. #nav {
  171. @apply flex justify-around;
  172. }
  173. #nav a {
  174. @apply text-black;
  175. }
  176. /* Blog */
  177. .blog-post {
  178. @apply w-full md:w-3/4 xl:w-1/2 max-w-3xl mx-auto;
  179. }
  180. .blog-post--body {
  181. @apply px-2;
  182. }
  183. .blog-post--body h2 {
  184. @apply mt-4;
  185. }
  186. .blog-post--body p {
  187. @apply my-2;
  188. }
  189. .blog-post--body blockquote {
  190. @apply pl-2 border-l-8 border-gray-600 italic;
  191. }
  192. .blog-post--footer {
  193. @apply mt-8 p-2 font-mono text-sm border-t border-black;
  194. }
  195. }