_chessboard.scss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. #board-moves-wrapper {
  2. width: 100%;
  3. max-width: 800px;
  4. min-height: 600px;
  5. margin: 0 auto;
  6. }
  7. #moves {
  8. overflow-x: hidden;
  9. overflow-y: auto;
  10. width: 270px;
  11. height: 518px;
  12. background: lighten($grey, 5%);
  13. box-shadow: inset 0 -4px $grey;
  14. margin-left: 10px;
  15. border-radius: 2px;
  16. border-bottom: 4px solid $grey;
  17. display: block;
  18. float: left;
  19. thead {
  20. font-family: 'Cherry Swash', cursive;
  21. width: 270px;
  22. height: 3em;
  23. line-height: 3em;
  24. font-size: 1.225rem;
  25. color: $dark-purple;
  26. float: left;
  27. text-align: center;
  28. th, tr {
  29. width: 100%;
  30. text-align: center;
  31. float: left;
  32. }
  33. }
  34. tbody tr {
  35. width: 270px;
  36. float: left;
  37. }
  38. tbody tr td {
  39. width: 85px;
  40. text-align: left;
  41. line-height: 20px;
  42. margin: 0 10px;
  43. float: left;
  44. &:first-child {
  45. width: 40px;
  46. margin-right: 0;
  47. }
  48. }
  49. }
  50. #board-wrapper {
  51. float: left;
  52. }
  53. .chessboard {
  54. border: 8px solid lighten($dark-purple, 10%);
  55. border-radius: 2px;
  56. width: 500px;
  57. height: 500px;
  58. float: left;
  59. tr {
  60. width: 500px;
  61. height: 62.5px;
  62. float: left;
  63. display: block;
  64. td {
  65. width: 62.5px;
  66. height: 62.5px;
  67. line-height: 62.5px;
  68. text-align: center;
  69. background: #fefefe;
  70. display: block;
  71. float: left;
  72. position: relative;
  73. &.moving, &.selected { background: lighten($red, 30%) !important; }
  74. &.from { background: lighten($blue, 25%) !important; }
  75. &.to { background: lighten($blue, 20%) !important; }
  76. &.droppable::after {
  77. position: absolute;
  78. content: "";
  79. width: 6px;
  80. height: 6px;
  81. border: 2px solid $red;
  82. top: 50%;
  83. left: 50%;
  84. margin-left: -5px;
  85. margin-top: -5px;
  86. background: lighten($red, 15%);
  87. transform: rotate(45deg);
  88. }
  89. a {
  90. font-family: 'Smart Regular';
  91. width: 62.5px;
  92. height: 62.5px;
  93. font-size: 3.5rem;
  94. color: #424242;
  95. text-decoration: none;
  96. display: inline-block;
  97. cursor: default;
  98. &.in-check { text-shadow: 0 0 1rem $red; }
  99. &[draggable="true"] { cursor: pointer; }
  100. }
  101. }
  102. }
  103. }
  104. .chessboard tr:nth-child(odd) td:nth-child(even),
  105. .chessboard tr:nth-child(even) td:nth-child(odd) {
  106. background: $grey;
  107. }
  108. .feedback {
  109. color: #424242;
  110. line-height: 28px;
  111. margin-top: 1em;
  112. display: block;
  113. clear: left;
  114. float: left;
  115. .icon {
  116. font-family: 'Smart Regular';
  117. font-size: 2rem;
  118. }
  119. }
  120. .promotion {
  121. line-height: 28px;
  122. text-indent: 28px;
  123. margin-top: 1em;
  124. display: block;
  125. float: right;
  126. }