style.less 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. @cardWidth: 7.6%;
  2. @cardHeight: 100px;
  3. @cardTranslateY: 45px;
  4. @cardTranslateX: 35px;
  5. @cardTextSize: 11px;
  6. @colorHeight: 25px;
  7. @communityIconSize: 30px;
  8. @cornerIconSize: 35px;
  9. @stationIconSize: 25px;
  10. @houseIconSize: 12px;
  11. @houseSize: calc(@colorHeight - 2px);
  12. @boardWidth: 950px;
  13. @diceSize: 40px;
  14. @diceDotSize: 7px;
  15. @primaryColor: #333333;
  16. @tokenSize: 40px;
  17. @tokenFontSize: 20px;
  18. @noteWidth: 100px;
  19. @noteHeight: 50px;
  20. @cardStackWidth: 150px;
  21. @cardStackHeight: 75px;
  22. body {
  23. font-family: 'Open Sans', sans-serif;
  24. padding: 0;
  25. margin: 0;
  26. }
  27. h3 {
  28. margin: 0 0 10px 0;
  29. }
  30. .game {
  31. display: grid;
  32. grid-template-areas: 'board board players logs' 'board board players video' 'board board players video' 'board board players video';
  33. grid-template-columns: repeat(2, calc(@boardWidth / 2)) repeat(2, 1fr);
  34. grid-template-rows: repeat(4, calc(@boardWidth / 4));
  35. }
  36. .game-loading {
  37. display: flex;
  38. align-items: center;
  39. justify-content: center;
  40. height: 100vh;
  41. }
  42. .card-overlay {
  43. position: fixed;
  44. top: 0;
  45. left: 0;
  46. right: 0;
  47. bottom: 0;
  48. background-color: rgba(0, 0, 0, 0.5);
  49. z-index: 999;
  50. .card-picked {
  51. position: absolute;
  52. top: 200px;
  53. left: calc(50% - 250px);
  54. width: 500px;
  55. min-height: 250px;
  56. border: 2px solid black;
  57. padding: 20px;
  58. display: flex;
  59. flex-direction: column;
  60. align-items: center;
  61. justify-content: center;
  62. span {
  63. display: block;
  64. padding: 10px;
  65. }
  66. &.chance {
  67. background-color: #ffa500;
  68. }
  69. &.community {
  70. background-color: #4987ff;
  71. }
  72. .close {
  73. position: absolute;
  74. font-size: 20px;
  75. top: 15px;
  76. right: 15px;
  77. cursor: pointer;
  78. }
  79. .card-type, .card-player {
  80. font-size: 25px;
  81. font-weight: bold;
  82. }
  83. .card-text {
  84. flex-grow: 2;
  85. font-size: 30px;
  86. }
  87. }
  88. }
  89. .video-chat {
  90. .video-container {
  91. display: grid;
  92. grid-template-columns: 50% 50%;
  93. video {
  94. background-color: black;
  95. margin: 1px;
  96. cursor: pointer;
  97. transition: all 0.25s;
  98. width: 100%;
  99. height: 150px;
  100. //&:hover {
  101. // width: 100%;
  102. // height: auto;
  103. //}
  104. }
  105. }
  106. .chat {
  107. height: 150px;
  108. overflow-y: auto;
  109. p {
  110. margin: 0;
  111. font-size: 14px;
  112. }
  113. }
  114. }
  115. .logs {
  116. grid-area: logs;
  117. .text {
  118. height: 150px;
  119. overflow-y: auto;
  120. p {
  121. margin: 0;
  122. font-size: 14px;
  123. }
  124. }
  125. }
  126. .player-list {
  127. grid-area: players;
  128. width: 400px;
  129. }
  130. .video-chat {
  131. grid-area: video;
  132. }
  133. .me {
  134. h1 {
  135. margin: 10px 0 0 0;
  136. font-size: 20px;
  137. }
  138. }
  139. .card-stack {
  140. position: absolute;
  141. width: @cardStackWidth;
  142. height: @cardStackHeight;
  143. display: flex;
  144. flex-direction: column;
  145. align-items: center;
  146. justify-content: center;
  147. border: 1px solid black;
  148. top: 550px;
  149. cursor: pointer;
  150. &.chance-stack {
  151. left: 200px;
  152. background-color: #ffa500;
  153. }
  154. &.community-stack {
  155. left: 500px;
  156. background-color: #4987ff;
  157. }
  158. }
  159. .board-container {
  160. grid-area: board;
  161. position: relative;
  162. .dice-set {
  163. cursor: pointer;
  164. position: absolute;
  165. top: 200px;
  166. left: 300px;
  167. }
  168. .board-token {
  169. position: absolute;
  170. z-index: 20;
  171. }
  172. }
  173. .board {
  174. user-select: none;
  175. background-color: rgba(176, 255, 140, 0.64);
  176. width: @boardWidth;
  177. height: @boardWidth;
  178. display: grid;
  179. grid-template-columns: repeat(24, 1fr);
  180. grid-template-rows: repeat(24, 1fr);
  181. //grid-template-areas: 'p20 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p30' 'p20 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p30' 'p19 p19 e e e e e e e e e p31 p31' 'p18 p18 e e e e e e e e e p32 p32' 'p17 p17 e e e e e e e e e p33 p33' 'p16 p16 e e e e e e e e e p34 p34' 'p15 p15 e e e e e e e e e p35 p35' 'p14 p14 e e e e e e e e e p36 p36' 'p13 p13 e e e e e e e e e p37 p37' 'p12 p12 e e e e e e e e e p38 p38' 'p11 p11 e e e e e e e e e p39 p39' 'p10 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0 p0' 'p10 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0 p0';
  182. grid-template-areas: 'p20 p20 p20 p21 p21 p22 p22 p23 p23 p24 p24 p25 p25 p26 p26 p27 p27 p28 p28 p29 p29 p30 p30 p30' 'p20 p20 p20 p21 p21 p22 p22 p23 p23 p24 p24 p25 p25 p26 p26 p27 p27 p28 p28 p29 p29 p30 p30 p30' 'p20 p20 p20 p21 p21 p22 p22 p23 p23 p24 p24 p25 p25 p26 p26 p27 p27 p28 p28 p29 p29 p30 p30 p30' 'p19 p19 p19 e e e e e e e e e e e e e e e e e e p31 p31 p31' 'p19 p19 p19 e e e e e e e e e e e e e e e e e e p31 p31 p31' 'p18 p18 p18 e e e e e e e e e e e e e e e e e e p32 p32 p32' 'p18 p18 p18 e e e e e e e e e e e e e e e e e e p32 p32 p32' 'p17 p17 p17 e e e e e e e e e e e e e e e e e e p33 p33 p33' 'p17 p17 p17 e e e e e e e e e e e e e e e e e e p33 p33 p33' 'p16 p16 p16 e e e e e e e e e e e e e e e e e e p34 p34 p34' 'p16 p16 p16 e e e e e e e e e e e e e e e e e e p34 p34 p34' 'p15 p15 p15 e e e e e e e e e e e e e e e e e e p35 p35 p35' 'p15 p15 p15 e e e e e e e e e e e e e e e e e e p35 p35 p35' 'p14 p14 p14 e e e e e e e e e e e e e e e e e e p36 p36 p36' 'p14 p14 p14 e e e e e e e e e e e e e e e e e e p36 p36 p36' 'p13 p13 p13 e e e e e e e e e e e e e e e e e e p37 p37 p37' 'p13 p13 p13 e e e e e e e e e e e e e e e e e e p37 p37 p37' 'p12 p12 p12 e e e e e e e e e e e e e e e e e e p38 p38 p38' 'p12 p12 p12 e e e e e e e e e e e e e e e e e e p38 p38 p38' 'p11 p11 p11 e e e e e e e e e e e e e e e e e e p39 p39 p39' 'p11 p11 p11 e e e e e e e e e e e e e e e e e e p39 p39 p39' 'p10 p10 p10 p9 p9 p8 p8 p7 p7 p6 p6 p5 p5 p4 p4 p3 p3 p2 p2 p1 p1 p0 p0 p0' 'p10 p10 p10 p9 p9 p8 p8 p7 p7 p6 p6 p5 p5 p4 p4 p3 p3 p2 p2 p1 p1 p0 p0 p0' 'p10 p10 p10 p9 p9 p8 p8 p7 p7 p6 p6 p5 p5 p4 p4 p3 p3 p2 p2 p1 p1 p0 p0 p0';
  183. }
  184. .board-row {
  185. display: flex;
  186. align-content: stretch;
  187. &.middle-row {
  188. //border:1px solid red;
  189. height: @cardWidth;
  190. }
  191. .board-middle {
  192. flex-grow: 2;
  193. }
  194. }
  195. .generate-grid(@n, @i:0) when (@i =< @n) {
  196. &.grid-area-@{i} {
  197. @p: ~"p@{i}";
  198. grid-area: @p;
  199. }
  200. .generate-grid(@n, (@i + 1));
  201. }
  202. .generate-grid(39);
  203. .board-card {
  204. position: relative;
  205. //width: @cardWidth;
  206. //height: @cardHeight;
  207. border: 1px solid black;
  208. box-sizing: border-box;
  209. font-size: @cardTextSize;
  210. cursor: pointer;
  211. display: flex;
  212. flex-direction: column;
  213. &.left, &.right {
  214. //flex-direction: row;
  215. writing-mode: vertical-rl;
  216. .icon svg {
  217. transform-origin: center;
  218. transform: rotate(90deg);
  219. }
  220. .color {
  221. height: auto;
  222. width: @colorHeight;
  223. border-bottom: none;
  224. border-left: 1px solid black;
  225. }
  226. &.mortgaged:after {
  227. left: 48px;
  228. top: -10px;
  229. }
  230. }
  231. &.right {
  232. transform: rotate(180deg);
  233. .house, .hotel{
  234. transform: rotate(90deg);
  235. }
  236. }
  237. .icon {
  238. display: flex;
  239. align-items: center;
  240. justify-content: center;
  241. }
  242. &.mortgaged {
  243. &:after {
  244. content: "Mortgaged";
  245. color: red;
  246. position: absolute;
  247. top: 48px;
  248. left: -9px;
  249. font-size: 18px;
  250. font-weight: bold;
  251. transform: rotate(45deg);
  252. pointer-events: none;
  253. }
  254. }
  255. &.opened {
  256. width: 300px !important;
  257. height: auto !important;
  258. font-size: 18px !important;
  259. background-color: white;
  260. position: fixed;
  261. z-index: 100;
  262. top: 50px;
  263. left: calc(50% - 150px);
  264. transform: none !important;
  265. box-shadow: 0px 8px 32px 12px rgba(0, 0, 0, 0.61);
  266. writing-mode: unset !important;
  267. &.mortgaged:after {
  268. font-size: 60px;
  269. top: 177px !important;
  270. left: -9px !important;
  271. opacity: 0.5;
  272. }
  273. .close {
  274. position: absolute;
  275. top: -10px;
  276. right: -10px;
  277. }
  278. .close-button {
  279. color: black;
  280. }
  281. .body {
  282. padding: 20px;
  283. font-size: 15px;
  284. flex-grow: 2;
  285. }
  286. .icon {
  287. flex-grow: 0;
  288. svg {
  289. transform: none !important;
  290. }
  291. }
  292. .color {
  293. height: calc(@colorHeight * 2.5) !important;
  294. border-left: none !important;
  295. border-bottom: 1px solid black !important;
  296. width: 300px !important;
  297. .house, .hotel {
  298. font-size: calc(@houseIconSize * 4) !important;
  299. transform: none !important;
  300. }
  301. }
  302. }
  303. &:hover {
  304. background-color: white;
  305. }
  306. &.top {
  307. transform: rotateZ(180deg);
  308. }
  309. }
  310. .corner-card {
  311. //width: @cardHeight;
  312. //height: @cardHeight;
  313. font-size: @cardTextSize;
  314. border: 1px solid black;
  315. &.top {
  316. transform: rotateZ(180deg);
  317. }
  318. }
  319. .street {
  320. .color {
  321. height: @colorHeight;
  322. border-bottom: 2px solid black;
  323. display: flex;
  324. .house, .hotel {
  325. display: flex;
  326. align-items: center;
  327. justify-content: center;
  328. text-align: center;
  329. font-size: @houseIconSize;
  330. margin-right: 5px;
  331. }
  332. .house {
  333. color: #00FF00;
  334. }
  335. .hotel {
  336. color: #FF0000;
  337. }
  338. }
  339. .title, .price {
  340. text-align: center;
  341. }
  342. .body {
  343. flex-grow: 2;
  344. }
  345. }
  346. .chance, .community {
  347. text-align: center;
  348. .icon {
  349. flex-grow: 2;
  350. color: #4987ff;
  351. font-size: @communityIconSize;
  352. }
  353. }
  354. .community {
  355. .icon {
  356. font-size: @communityIconSize;
  357. padding-top: 10px;
  358. }
  359. }
  360. .train-station, .utility, .super-tax, .income-tax {
  361. .title, .price {
  362. text-align: center;
  363. }
  364. .icon {
  365. text-align: center;
  366. font-size: @stationIconSize;
  367. padding-top: 5px;
  368. flex-grow: 2;
  369. }
  370. }
  371. .free-parking, .go-to-jail, .go, .jail {
  372. .container {
  373. display: flex;
  374. flex-direction: column;
  375. width: 100%;
  376. height: 100%;
  377. transform: rotateZ(-45deg);
  378. text-align: center;
  379. align-items: center;
  380. justify-content: center;
  381. .icon {
  382. flex-grow: 2;
  383. font-size: @cornerIconSize;
  384. color: #a40000;
  385. }
  386. }
  387. }
  388. .go-to-jail {
  389. .container {
  390. transform: rotateZ(-135deg);
  391. }
  392. .icon {
  393. color: #5544ff !important;
  394. }
  395. }
  396. .go, .jail {
  397. .container {
  398. transform: rotateZ(-0deg);
  399. }
  400. .icon {
  401. color: #a80f00 !important;
  402. }
  403. }
  404. .jail {
  405. position: relative;
  406. display: grid;
  407. grid-template-areas: 'visit-left cell cell ' 'visit-left cell cell ' 'e visit-bottom visit-bottom';
  408. grid-template-rows: repeat(3, 1fr);
  409. grid-template-columns: repeat(3, 1fr);
  410. .cell {
  411. grid-area: cell;
  412. display: flex;
  413. align-items: center;
  414. justify-content: center;
  415. box-sizing: border-box;
  416. background-color: orange;
  417. font-size: @cornerIconSize;
  418. }
  419. .visit-left, .visit-bottom {
  420. display: flex;
  421. align-items: center;
  422. justify-content: center;
  423. }
  424. .visit-left {
  425. grid-area: visit-left;
  426. writing-mode: vertical-lr;
  427. }
  428. .visit-bottom {
  429. grid-area: visit-bottom;
  430. }
  431. }
  432. .dice {
  433. border: 1px solid black;
  434. border-radius: 5px;
  435. margin: 20px;
  436. background-color: beige;
  437. width: @diceSize;
  438. height: @diceSize;
  439. position: relative;
  440. &.rolling {
  441. animation: shake 1s cubic-bezier(.36, .07, .19, .97) both infinite;
  442. }
  443. .dot {
  444. width: @diceDotSize;
  445. height: @diceDotSize;
  446. background-color: black;
  447. border-radius: @diceDotSize;
  448. position: absolute;
  449. &.middle-center {
  450. top: calc(50% - @diceDotSize / 2);
  451. left: calc(50% - @diceDotSize / 2);
  452. }
  453. &.middle-left {
  454. top: calc(50% - @diceDotSize / 2);
  455. left: calc(25% - @diceDotSize / 2);
  456. }
  457. &.middle-right {
  458. top: calc(50% - @diceDotSize / 2);
  459. right: calc(25% - @diceDotSize / 2);
  460. }
  461. &.top-left {
  462. top: calc(25% - @diceDotSize / 2);
  463. left: calc(25% - @diceDotSize / 2);
  464. }
  465. &.top-right {
  466. top: calc(25% - @diceDotSize / 2);
  467. right: calc(25% - @diceDotSize / 2);
  468. }
  469. &.bottom-left {
  470. bottom: calc(25% - @diceDotSize / 2);
  471. left: calc(25% - @diceDotSize / 2);
  472. }
  473. &.bottom-right {
  474. bottom: calc(25% - @diceDotSize / 2);
  475. right: calc(25% - @diceDotSize / 2);
  476. }
  477. }
  478. }
  479. .dialog {
  480. &.overlay {
  481. position: absolute;
  482. top: 0;
  483. left: 0;
  484. right: 0;
  485. bottom: 0;
  486. z-index: 20;
  487. background-color: rgba(0, 0, 0, 0.5);
  488. }
  489. .content {
  490. margin: 100px auto;
  491. display: block;
  492. background-color: white;
  493. width: 500px;
  494. min-height: 100px;
  495. padding: 10px 50px;
  496. border-radius: 5px;
  497. box-shadow: 0px 8px 32px 12px rgba(0, 0, 0, 0.61);
  498. }
  499. .actions {
  500. display: flex;
  501. justify-content: flex-end;
  502. cursor: pointer;
  503. .action {
  504. color: @primaryColor;
  505. cursor: pointer;
  506. padding: 0 10px;
  507. margin: 5px 10px;
  508. &:hover {
  509. background-color: #60f7ff;
  510. }
  511. }
  512. }
  513. }
  514. .select-player-dialog, send-money-dialog {
  515. .player {
  516. display: flex;
  517. align-items: center;
  518. justify-content: left;
  519. cursor: pointer;
  520. }
  521. }
  522. .token {
  523. display: inline-flex;
  524. align-items: center;
  525. justify-content: center;
  526. margin: 2px 5px;
  527. width: @tokenSize;
  528. height: @tokenSize;
  529. border-radius: @tokenSize;
  530. font-size: @tokenFontSize;
  531. background-color: #888888;
  532. color: white;
  533. text-align: center;
  534. cursor: pointer;
  535. border: 1px solid #333;
  536. &.selected {
  537. background-color: green;
  538. }
  539. }
  540. .player-list {
  541. padding: 10px;
  542. .player-tabs .player {
  543. display: inline-flex;
  544. align-items: center;
  545. justify-content: left;
  546. cursor: pointer;
  547. }
  548. }
  549. .player-board {
  550. display: flex;
  551. flex-direction: column;
  552. align-items: flex-start;
  553. justify-content: left;
  554. .notes {
  555. display: flex;
  556. align-items: center;
  557. justify-content: left;
  558. flex-wrap: wrap;
  559. .note {
  560. margin: 5px;
  561. }
  562. small {
  563. font-size: 14px;
  564. }
  565. }
  566. .deeds {
  567. display: flex;
  568. align-items: center;
  569. justify-content: left;
  570. flex-wrap: wrap;
  571. .board-card {
  572. width: 75px;
  573. height: 100px;
  574. margin: 5px;
  575. }
  576. }
  577. }
  578. .note {
  579. width: @noteWidth;
  580. height: @noteHeight;
  581. display: flex;
  582. align-items: center;
  583. justify-content: center;
  584. font-weight: bold;
  585. border: 1px solid black;
  586. &.v500 {
  587. background-color: #ffa500;
  588. }
  589. &.v100 {
  590. background-color: #fff587;
  591. }
  592. &.v50 {
  593. background-color: #84129f;
  594. }
  595. &.v20 {
  596. background-color: #7f9f5c;
  597. }
  598. &.v10 {
  599. background-color: #57849f;
  600. }
  601. &.v5 {
  602. background-color: #9e789f;
  603. }
  604. &.v1 {
  605. background-color: rgba(186, 183, 187, 0.44);
  606. }
  607. }
  608. .send-money-dialog {
  609. .select-notes {
  610. .notes {
  611. display: flex;
  612. align-items: center;
  613. justify-content: left;
  614. .noteStack {
  615. display: flex;
  616. align-items: center;
  617. justify-content: left;
  618. }
  619. .note {
  620. margin: 5px;
  621. }
  622. }
  623. }
  624. }
  625. .game-settings {
  626. position: absolute;
  627. top: 10px;
  628. right: 10px;
  629. ul {
  630. list-style: none;
  631. position: absolute;
  632. top: 30px;
  633. right: 0;
  634. margin: 0;
  635. padding: 0;
  636. box-shadow: 0px 8px 32px 12px rgba(0, 0, 0, 0.61);
  637. background-color: white;
  638. width: 200px;
  639. border-radius: 5px;
  640. li {
  641. cursor: pointer;
  642. display: block;
  643. border-bottom: 1px solid #aaa;
  644. padding: 10px 20px;
  645. box-sizing: border-box;
  646. }
  647. }
  648. }
  649. @keyframes shake {
  650. 10%, 90% {
  651. transform: translate3d(-1px, 0, 0);
  652. }
  653. 20%, 80% {
  654. transform: translate3d(2px, 0, 0);
  655. }
  656. 30%, 50%, 70% {
  657. transform: translate3d(-4px, 0, 0);
  658. }
  659. 40%, 60% {
  660. transform: translate3d(4px, 0, 0);
  661. }
  662. }