orderbook.scss 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. .orderbook {
  2. display: flex;
  3. flex-direction: column;
  4. background: var(--bg-page);
  5. height: 100%;
  6. .orderbook-title {
  7. display: flex;
  8. justify-content: space-between;
  9. align-items: center;
  10. font-size: 0.813rem;
  11. font-weight: 600;
  12. padding: 8px 12px;
  13. border-bottom: 1px solid var(--border-default);
  14. color: var(--text-primary);
  15. .orderbook-total {
  16. display: flex;
  17. gap: 10px;
  18. font-size: 0.688rem;
  19. font-weight: 400;
  20. .total-ask {
  21. color: hsl(var(--crypto-down));
  22. }
  23. .total-bid {
  24. color: hsl(var(--crypto-up));
  25. }
  26. }
  27. }
  28. .orderbook-loading {
  29. padding: 24px;
  30. text-align: center;
  31. color: var(--text-muted);
  32. font-size: 0.813rem;
  33. }
  34. .orderbook-body {
  35. display: flex;
  36. flex-direction: column;
  37. flex: 1;
  38. min-height: 0;
  39. font-variant-numeric: tabular-nums;
  40. }
  41. // 매도 섹션: column-reverse로 낮은 가격이 아래(스프레드 근처)
  42. .ask-section {
  43. flex: 1;
  44. min-height: 0;
  45. overflow-y: auto;
  46. display: flex;
  47. flex-direction: column-reverse;
  48. &::-webkit-scrollbar {
  49. width: 0;
  50. }
  51. }
  52. // 매수 섹션
  53. .bid-section {
  54. flex: 1;
  55. min-height: 0;
  56. overflow-y: auto;
  57. &::-webkit-scrollbar {
  58. width: 0;
  59. }
  60. }
  61. .orderbook-row {
  62. display: flex;
  63. justify-content: space-between;
  64. align-items: center;
  65. position: relative;
  66. padding: 3px 12px;
  67. font-size: 0.75rem;
  68. transition: background-color 0.1s;
  69. flex-shrink: 0;
  70. .bar {
  71. position: absolute;
  72. top: 0;
  73. bottom: 0;
  74. opacity: 0.12;
  75. }
  76. // 매도: bar 왼쪽에서 확장 (수량 쪽)
  77. &.ask .bar {
  78. left: 0;
  79. background: hsl(var(--crypto-down));
  80. }
  81. // 매수: bar 오른쪽에서 확장 (수량 쪽)
  82. &.bid .bar {
  83. right: 0;
  84. background: hsl(var(--crypto-up));
  85. }
  86. .price {
  87. position: relative;
  88. z-index: 1;
  89. font-weight: 500;
  90. }
  91. &.ask .price {
  92. color: hsl(var(--crypto-down));
  93. }
  94. &.bid .price {
  95. color: hsl(var(--crypto-up));
  96. }
  97. .size {
  98. position: relative;
  99. z-index: 1;
  100. color: var(--text-secondary);
  101. }
  102. // 체결 플래시 효과
  103. &.flash-sell {
  104. animation: flash-sell 0.5s ease-out;
  105. }
  106. &.flash-buy {
  107. animation: flash-buy 0.5s ease-out;
  108. }
  109. // LTP 5m ago 가이드선
  110. .ltp-guide {
  111. position: absolute;
  112. top: -1px;
  113. left: 0;
  114. right: 0;
  115. height: 2px;
  116. background: #E8B730;
  117. z-index: 2;
  118. &::after {
  119. content: 'LTP 5m ago';
  120. position: absolute;
  121. right: 4px;
  122. top: -15px;
  123. font-size: 0.6rem;
  124. font-weight: 600;
  125. color: #fff;
  126. background: #E8B730;
  127. padding: 1px 5px;
  128. border-radius: 3px;
  129. white-space: nowrap;
  130. }
  131. }
  132. }
  133. .spread-row {
  134. display: flex;
  135. justify-content: space-between;
  136. align-items: center;
  137. padding: 5px 12px;
  138. font-size: 0.75rem;
  139. background: var(--bg-elevated);
  140. border-top: 1px solid var(--border-default);
  141. border-bottom: 1px solid var(--border-default);
  142. flex-shrink: 0;
  143. .spread-price {
  144. font-weight: 600;
  145. color: var(--text-primary);
  146. }
  147. .spread-info {
  148. color: var(--text-muted);
  149. font-size: 0.688rem;
  150. }
  151. }
  152. }
  153. @keyframes flash-sell {
  154. 0% {
  155. background-color: hsla(var(--crypto-down), 0.3);
  156. }
  157. 100% {
  158. background-color: transparent;
  159. }
  160. }
  161. @keyframes flash-buy {
  162. 0% {
  163. background-color: hsla(var(--crypto-up), 0.3);
  164. }
  165. 100% {
  166. background-color: transparent;
  167. }
  168. }