style.scss 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. $dark-purple: #423443;
  2. $blue: #2eafc2;
  3. $red: #d12521;
  4. $grey: #dad7d2;
  5. @mixin all-transition{
  6. -moz-transition: all 0.2s ease-in-out;
  7. -webkit-transition: all 0.2s ease-in-out;
  8. -o-transition: all 0.2s ease-in-out;
  9. -ms-transition: all 0.2s ease-in-out;
  10. transition: all 0.2s ease-in-out;
  11. }
  12. * {
  13. margin: 0;
  14. padding: 0;
  15. -moz-box-sizing: border-box;
  16. -webkit-box-sizing: border-box;
  17. box-sizing: border-box;
  18. }
  19. html { font-size: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; -webkit-tap-highlight-color: rgba(0,0,0,0); -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
  20. ::-moz-selection { background: darken($dark-purple, 10%); color: #fefefe; text-shadow: none; }
  21. ::selection { background: darken($dark-purple, 10%); color: #fefefe; text-shadow: none; }
  22. .clearfix:before,
  23. .clearfix:after {
  24. content: " ";
  25. display: table;
  26. }
  27. .clearfix:after {
  28. clear: both;
  29. }
  30. .clearfix {
  31. zoom:1;
  32. }
  33. footer, header, section {
  34. display: block;
  35. }
  36. body, html {
  37. color: #424242;
  38. font-family: 'Open Sans', sans-serif;
  39. background: #fefefe;
  40. font-size: 16px;
  41. line-height: 1.5;
  42. font-weight: 400;
  43. }
  44. a {
  45. font-size: 1rem;
  46. color: darken($blue, 5%);
  47. text-decoration: underline; }
  48. a:hover {
  49. color: $blue;
  50. text-decoration: none;
  51. @include all-transition }
  52. p {
  53. text-align: left;
  54. margin-bottom: 1em;
  55. font-size: 1rem;
  56. }
  57. h1.knight {
  58. height: 122px;
  59. width: 122px;
  60. background: url('../images/knight.png') no-repeat;
  61. margin: 2em auto 0.5em auto;
  62. }
  63. h2 {
  64. font-family: 'Cherry Swash';
  65. font-weight: 400;
  66. font-size: 2rem;
  67. text-align: center;
  68. color: $dark-purple;
  69. margin-bottom: 0.5em;
  70. }
  71. h3 {
  72. font-weight: 600;
  73. font-size: 1.5rem;
  74. margin: 1em 0 0.5em 0;
  75. color: lighten($dark-purple, 5%);
  76. }
  77. .alpha {
  78. font-size: 1.125rem;
  79. }
  80. .center {
  81. text-align: center !important;
  82. }
  83. .margin-fifty{
  84. margin: 50px 0;
  85. }
  86. .last-origin{
  87. background: lighten($blue, 25%) !important;
  88. }
  89. .last-target{
  90. background: lighten($blue, 20%) !important;
  91. }
  92. .about-in-play {
  93. margin-right: 1em;
  94. line-height: 50px;
  95. float: right !important;
  96. }
  97. .fork{
  98. float: left;
  99. width: 149px;
  100. height: 149px;
  101. background: url('../images/forkme.png') no-repeat;
  102. position: absolute;
  103. }
  104. header {
  105. margin: 0 auto;
  106. max-width: 800px;
  107. width: 100%;
  108. height: 50px;
  109. }
  110. #container_wrapper {
  111. max-width: 960px;
  112. width: 100%;
  113. height: auto;
  114. padding: 1em 2em;
  115. margin: 0 auto;
  116. clear: both;
  117. }
  118. #container {
  119. width: 100%;
  120. min-height: 600px;
  121. margin: 0px 0px 20px 0px;
  122. float: left;
  123. }
  124. #form{
  125. width: 100%;
  126. height: 150px;
  127. margin: 0 auto;
  128. }
  129. input, button{
  130. font-family: 'Open Sans';
  131. }
  132. input.game_link {
  133. width: 80%;
  134. height: 50px;
  135. line-height: 50px;
  136. font-size: 1.125rem;
  137. color: #fff;
  138. border: 0;
  139. border-bottom: 2px solid darken($dark-purple, 8%);
  140. border-left: 4px solid $blue;
  141. text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  142. background: $dark-purple;
  143. padding: 0 1em;
  144. float: left;
  145. border-radius: 2px;
  146. box-shadow: inset 0 -2px darken($dark-purple, 8%);
  147. }
  148. .game_link:hover {
  149. background: lighten($dark-purple, 3%);
  150. border-bottom: 2px solid darken($dark-purple, 3%);;
  151. box-shadow: inset 0 -2px darken($dark-purple, 3%);
  152. @include all-transition;
  153. }
  154. .game_link:focus {
  155. color: #eee;
  156. }
  157. .button {
  158. width: 15%;
  159. height: 50px;
  160. display: block;
  161. font-size: 1.125rem;
  162. border-radius: 2px;
  163. border: 0;
  164. border-bottom: 2px solid darken($blue, 5%);
  165. text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  166. background: $blue;
  167. color: white;
  168. cursor: pointer;
  169. float: right;
  170. box-shadow: inset 0 -2px darken($blue, 5%);
  171. position: relative;
  172. }
  173. .button:hover{
  174. background: lighten($blue, 5%);
  175. border-bottom: 2px solid darken($blue, 2%);
  176. box-shadow: inset 0 -2px darken($blue, 2%);
  177. @include all-transition;
  178. }
  179. .button:active{
  180. top: 1px;
  181. }
  182. a.button{
  183. width: 120px;
  184. line-height: 46px;
  185. text-align: center;
  186. text-decoration: none;
  187. }
  188. a.button:hover{
  189. color: white;
  190. }
  191. .resign {
  192. background: $red;
  193. border-color: darken($red, 5%);
  194. box-shadow: inset 0 -2px darken($red, 5%);
  195. margin-right: 10px;
  196. }
  197. .resign:hover {
  198. background: lighten($red, 5%);
  199. border-bottom: 2px solid darken($red, 2%);
  200. box-shadow: inset 0 -2px darken($red, 2%);
  201. @include all-transition;
  202. }
  203. p#waiting {
  204. font-family: 'Cherry Swash';
  205. font-size: 1.275rem;
  206. color: darken($red, 5%);
  207. width: 100%;
  208. text-align: center;
  209. margin: 15px 0px 0px 0px;
  210. display: none;
  211. float: left;
  212. }
  213. footer {
  214. font-size: 1rem;
  215. width: 100%;
  216. line-height: 2em;
  217. text-align: center;
  218. background: $grey;
  219. border-bottom: 4px solid darken($grey, 10%);
  220. box-shadow: inset 0 -4px darken($grey, 10%);
  221. a{
  222. color: darken($grey, 45%);
  223. }
  224. a:hover{
  225. color: darken($grey, 40%);
  226. }
  227. }
  228. #footer{
  229. margin: 0 auto;
  230. max-width: 960px;
  231. padding: 3em 2em 1em 2em;
  232. }
  233. #sounds_label {
  234. width: 800px;
  235. height: 30px;
  236. line-height: 30px;
  237. display: block;
  238. margin: 0px 0px 5px 0px;
  239. float: left;
  240. }
  241. /* Chessboard */
  242. #board_moves_wrapper {
  243. width: 100%;
  244. max-width: 800px;
  245. min-height: 600px;
  246. margin: 0 auto;
  247. }
  248. table#moves {
  249. overflow-x: hidden;
  250. overflow-y: auto;
  251. width: 270px;
  252. height: 518px;
  253. background: lighten($grey, 5%);
  254. box-shadow: inset 0 -4px $grey;
  255. margin-left: 10px;
  256. border-radius: 2px;
  257. border-bottom: 4px solid $grey;
  258. display: block;
  259. float: left;
  260. }
  261. #moves thead {
  262. font-family: 'Cherry Swash';
  263. width: 270px;
  264. height: 3em;
  265. line-height: 3em;
  266. font-size: 1.225rem;
  267. color: $dark-purple;
  268. float: left;
  269. text-align: center;
  270. }
  271. #moves thead th, #moves thead tr {
  272. width: 100%;
  273. text-align: center;
  274. float: left;
  275. }
  276. #moves tbody tr {
  277. width: 270px;
  278. float: left;
  279. }
  280. #moves tbody tr td {
  281. width: 105px;
  282. text-align: left;
  283. line-height: 20px;
  284. margin: 0 15px;
  285. float: left;
  286. }
  287. #board_wrapper {
  288. float: left;
  289. }
  290. .chess_board {
  291. border: 8px solid lighten($dark-purple, 10%);
  292. border-radius: 2px;
  293. width: 500px;
  294. height: 500px;
  295. float: left;
  296. tr {
  297. width: 500px;
  298. height: 62.5px;
  299. float: left;
  300. display: block;
  301. td {
  302. width: 62.5px;
  303. height: 62.5px;
  304. line-height: 62.5px;
  305. text-align: center;
  306. background: #fefefe;
  307. display: block;
  308. float: left;
  309. a {
  310. width: 62.5px;
  311. height: 62.5px;
  312. font-size: 3.5rem;
  313. color: #424242;
  314. text-decoration: none;
  315. display: block;
  316. }
  317. }
  318. }
  319. }
  320. .chess_board tr:nth-child(odd) td:nth-child(even),
  321. .chess_board tr:nth-child(even) td:nth-child(odd) {
  322. background: $grey; }
  323. span.feedback {
  324. color: #424242;
  325. line-height: 28px;
  326. text-indent: 28px;
  327. margin-top: 1em;
  328. display: block;
  329. clear: left;
  330. float: left;
  331. }
  332. .feedback-status {
  333. font-weight: bold;
  334. }
  335. span.whitefeedback {
  336. background: url('../images/whiteking.png') 0% 50% no-repeat;
  337. }
  338. span.blackfeedback {
  339. background: url('../images/blackking.png') 0% 50% no-repeat;
  340. }
  341. span.promotion{
  342. line-height: 28px;
  343. text-indent: 28px;
  344. margin-top: 1em;
  345. display: block;
  346. float: right;
  347. }
  348. .chess_board td.selected {
  349. background: lighten($red, 30%) !important;
  350. }
  351. /* Media queries */
  352. @media only screen and (min-width: 760px) and (max-width: 900px) {
  353. header, #board_moves_wrapper{
  354. max-width: 760px;
  355. }
  356. #sounds_label{
  357. max-width: 530px;
  358. }
  359. #container_wrapper{
  360. max-width: 900px;
  361. padding: 1em 10px;
  362. }
  363. table#moves{
  364. margin-left: 0;
  365. float: right;
  366. height: 516px;
  367. }
  368. table#moves, #moves thead, #moves tbody tr{
  369. width: 200px;
  370. }
  371. #moves tbody tr td {
  372. width: 90px;
  373. margin: 0 5px;
  374. }
  375. }
  376. @media only screen and (min-width: 530px) and (max-width: 759px) {
  377. header, #board_moves_wrapper, #sounds_label{
  378. max-width: 530px;
  379. }
  380. }
  381. @media only screen and (max-width: 759px){
  382. html{
  383. font-size: 14px;
  384. }
  385. #container_wrapper{
  386. max-width: 759px;
  387. padding: 1em 5px;
  388. }
  389. span.feedback{
  390. float: right;
  391. clear: none;
  392. }
  393. table#moves{
  394. margin-left: 0;
  395. margin-top: 0.5em;
  396. height: 258px;
  397. }
  398. }
  399. @media only screen and (max-width: 529px){
  400. header, #board_moves_wrapper, #sounds_label{
  401. max-width: 470px;
  402. }
  403. input.game_link{
  404. font-size: 1rem;
  405. }
  406. #container_wrapper{
  407. max-width: 529px;
  408. padding: 1em 5px;
  409. }
  410. .chess_board {
  411. border: 4px solid lighten($dark-purple, 10%);
  412. width: 456px;
  413. height: 456px;
  414. tr {
  415. width: 456px;
  416. height: 57px;
  417. td {
  418. width: 57px;
  419. height: 57px;
  420. line-height: 57px;
  421. a {
  422. width: 57px;
  423. height: 57px;
  424. font-size: 3.5rem;
  425. }
  426. }
  427. }
  428. }
  429. }