_chessboard.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. &.moving { background: lighten($red, 30%) !important; }
  73. &.selected { background: lighten($red, 30%) !important; }
  74. &.from { background: lighten($blue, 25%) !important; }
  75. &.to { background: lighten($blue, 20%) !important; }
  76. a {
  77. width: 62.5px;
  78. height: 62.5px;
  79. font-size: 3.5rem;
  80. color: #424242;
  81. text-decoration: none;
  82. display: block;
  83. cursor: default;
  84. &[draggable="true"] {
  85. cursor: pointer;
  86. }
  87. }
  88. }
  89. }
  90. }
  91. .chessboard tr:nth-child(odd) td:nth-child(even),
  92. .chessboard tr:nth-child(even) td:nth-child(odd) {
  93. background: $grey;
  94. }
  95. .feedback {
  96. color: #424242;
  97. line-height: 28px;
  98. text-indent: 28px;
  99. margin-top: 1em;
  100. display: block;
  101. clear: left;
  102. float: left;
  103. &.white {
  104. background: url('../img/whiteking.png') 0% 50% no-repeat;
  105. }
  106. &.black {
  107. background: url('../img/whiteking.png') 0% 50% no-repeat;
  108. }
  109. }
  110. .promotion {
  111. line-height: 28px;
  112. text-indent: 28px;
  113. margin-top: 1em;
  114. display: block;
  115. float: right;
  116. }