make8bitart.com
at main 549 lines 8.1 kB view raw
1/** 2* make8bitart css 3* @author jenn schiffer 4*/ 5 6/* fonts */ 7@font-face { 8 font-family: "VT323"; 9 src: url("../assets/fonts/VT323-Regular-subset.woff2") format("woff2"), 10 url("../assets/fonts/VT323-Regular-subset.zopfli.woff") format("woff"), 11 url("../assets/fonts/VT323-Regular-subset.ttf") format("truetype"); 12 font-display: swap; 13} 14@font-face { 15 font-family: "8bit Art Sans"; 16 src: url("../assets/fonts/8bit-Art-Sans-subset.woff2") format("woff2"), 17 url("../assets/fonts/8bit-Art-Sans-subset.zopfli.woff") format("woff"), 18 url("../assets/fonts/8bit-Art-Sans-subset.ttf") format("truetype"); 19 font-display: swap; 20} 21 22body { 23 background: #fff; 24 padding: 0; 25 margin: 0; 26 font-family: "VT323", monospace; 27 font-size: 16px; 28 color: #000; 29} 30 31a { 32 color: blue; 33} 34 35h2 { 36 font-size: 1.5em; 37 margin: 0.1em 0; 38} 39 40menu { 41 padding-left: 0; 42} 43 44/* canvas */ 45canvas { 46 cursor: crosshair; 47 touch-action: none; 48 display: block; 49 image-rendering: optimizeSpeed; 50 image-rendering: -moz-crisp-edges; 51 image-rendering: -webkit-optimize-contrast; 52 image-rendering: -o-crisp-edges; 53 image-rendering: pixelated; 54 -ms-interpolation-mode: nearest-neighbor; 55} 56 57/* draggy "plugin" */ 58.draggydiv { 59 padding: 10px; 60 box-shadow: 6px 6px 0 #000; 61 border: 4px solid #000; 62 background: #eeffff; 63 -webkit-user-select: none; 64 -moz-user-select: none; 65 user-select: none; 66 overflow: hidden; 67} 68 69.draggydiv .menu { 70 float: right; 71 margin-left: 5px; 72} 73.draggydiv .menu button { 74 width: auto; 75 height: auto; 76 padding: 0; 77 margin: 0; 78 background: 0 0; 79 border: none; 80} 81.draggydiv .menu .draggydivs-drag { 82 cursor: move; 83 width: 30px; 84 height: 30px; 85 background: url("/assets/draggydivs/dragger.png"); 86} 87.draggydiv .menu .draggydivs-minimize, 88.draggydiv .menu .draggydivs-close { 89 cursor: pointer; 90 width: 30px; 91 height: 30px; 92 background: url("/assets/draggydivs/hider.png"); 93 color: red; 94} 95 96#header { 97 left: 60px !important; 98 top: 20px !important; 99} 100 101#toolbox { 102 left: 30px !important; 103 top: 250px !important; 104} 105 106#colorbox { 107 left: 750px !important; 108 top: 50px !important; 109} 110 111#filebox { 112 left: 285px !important; 113 top: 234px !important; 114} 115#what { 116 left: 505px !important; 117 top: 120px !important; 118} 119 120/* tabs */ 121.tabs { 122 list-style: none; 123 margin: 0; 124 padding: 0; 125} 126 127.tabs button { 128 font-family: "VT323", monospace; 129 font-size: 1em; 130 display: inline-block; 131 padding: 0.5em 1em; 132 margin: 0 0 0.5em; 133 border: 1px solid #000; 134 background-color: #ccc; 135 box-shadow: 2px 2px 0px #000; 136} 137 138.tabs button.active { 139 background-color: cyan; 140 box-shadow: inset 3px 3px 0px #000; 141} 142 143.tabs:hover { 144 cursor: pointer; 145} 146 147/* header */ 148header { 149 font-size: 1em; 150 width: 200px !important; 151} 152 153header h1 { 154 font-family: "8bit Art Sans"; 155 font-size: 2em; 156 line-height: 1em; 157 margin: 0; 158} 159 160#draggydivs-minimized { 161 font-size: 1.2em; 162 margin-top: 10px; 163 padding: 0; 164 list-style: none; 165} 166 167#draggydivs-minimized a { 168 display: inline-block; 169 padding: 3px 10px; 170 background: lime; 171 margin: 3px; 172 border: none; 173 font-family: "VT323", monospace; 174 font-size: 1em; 175 color: black; 176 text-decoration: none; 177} 178 179#draggydivs-minimized a:hover { 180 color: green; 181 cursor: pointer; 182} 183 184#draggydivs-minimized a:after { 185 content: " +"; 186} 187 188/* social and credits */ 189#what { 190 width: 200px !important; 191} 192 193/* canvas tools box */ 194#toolbox { 195 width: 200px !important; 196} 197 198#toolbox .inner { 199 margin: 1em 0; 200} 201 202#toolbox ul { 203 list-style: none; 204 margin: 0; 205 padding: 0; 206} 207 208#toolbox ul li { 209 display: inline-block; 210 margin: 0.2em; 211} 212 213.icon-button { 214 border: 3px dashed transparent; 215 padding: 0; 216 margin: 0; 217 background: 0; 218} 219 220.icon-button img { 221 padding: 0.3em; 222 vertical-align: middle; 223} 224 225.icon-button.current-tool { 226 border-color: black; 227} 228 229.text-button { 230 background: #efefef; 231 border: 2px solid #ccc; 232 padding: 0.3em 0.5em; 233 margin: 0.2em; 234 font-family: monospace; 235 font-size: 0.8em; 236 font-weight: bold; 237 cursor: pointer; 238} 239 240input[type="submit"] { 241 margin: 0.2em 0 0.2em 0; 242 font-size: 0.8em; 243} 244 245input[type="file"] { 246 max-width: 100%; 247} 248 249#pixel-size { 250 width: 75%; 251 font-size: 1.2em; 252 font-family: monospace; 253 padding: 5px 3px 3px; 254} 255 256#pixel-size-slider { 257 margin: 0; 258 width: 100%; 259} 260 261#pixel-size-demo { 262 background: black; 263} 264 265/* save box */ 266#filebox { 267 width: 175px !important; 268} 269 270#filebox input { 271 display: block; 272} 273 274#filebox label { 275 display: block; 276 margin: 1em 0.5em; 277} 278 279.instructions { 280 display: none; 281} 282 283/* color picker/palette box */ 284#colorbox { 285 width: 225px !important; 286} 287 288.colors, 289.colors li { 290 list-style: none; 291 margin: 0; 292 padding: 0; 293} 294 295.colors { 296 margin: 0.5em 0; 297} 298 299.button { 300 display: block; 301 float: left; 302 border: 2px solid rgba(255, 255, 255, 0.5); 303} 304 305.button.save { 306 float: none; 307 width: 75px; 308} 309 310.button:hover { 311 background: #ddd; 312} 313 314.button.color { 315 background: #fff; 316 border: 5px solid transparent; 317 width: 25px; 318 height: 25px; 319 padding: 0; 320 margin: 3px; 321} 322 323.button.color.cyan { 324 background: cyan; 325} 326 327.button.color.magenta { 328 background: magenta; 329} 330 331.button.color.yellow { 332 background: yellow; 333} 334 335.button.color.black { 336 background: black; 337} 338 339.button.color.gray { 340 background: gray; 341} 342 343.button.color.white { 344 background: white; 345 border: 2px solid rgba(0, 0, 0, 0.25); 346} 347 348.button.color.transparent { 349 border-color: #ccc; 350 background: url("../assets/bg.png"); 351} 352 353.button.color.current, 354.button.current, 355.button.custom.current { 356 border: 5px solid #333; 357} 358 359.button.brush.current { 360 margin: 1px 8px 1px 0; 361} 362 363/* color picker */ 364#eight-bit-colors { 365 margin: 0 auto; 366 background: transparent; 367} 368#eight-bit-picker { 369 position: relative; 370} 371 372#eight-bit-picker .color-demo { 373 background: #000; 374 width: 100%; 375 height: 20px; 376 margin-top: 10px; 377} 378 379#eight-bit-picker p { 380 font-size: 1.5em; 381 margin: 0 0 10px; 382} 383 384#hex-color { 385 width: 48%; 386 vertical-align: middle; 387 margin-left: 5px; 388 font-size: 1.5em; 389 font-family: monospace; 390 padding: 5px 3px 3px; 391} 392 393.pound { 394 vertical-align: middle; 395 font-size: 2em; 396} 397 398#color-dropper { 399 padding: 5px; 400 vertical-align: middle; 401} 402 403/* save and open modal */ 404.modal { 405 text-align: center; 406 width: 100%; 407 height: 100%; 408 background: rgba(0, 0, 0, 0.8); 409 position: absolute; 410 top: 0; 411 left: 0; 412 z-index: 999999; 413} 414 415.inside-modal { 416 text-align: center; 417 width: auto; 418 max-width: 50%; 419 display: inline-block; 420 padding: 20px; 421 margin: 20px; 422 box-shadow: 5px 5px 0 #000; 423 border: 1px solid #000; 424 background: #eeffff; 425 position: relative; 426} 427 428.inside-modal h2 { 429 font-size: 2em; 430 margin: 0.25em 1em; 431} 432 433.inside-modal .ui-hider { 434 position: absolute; 435 top: 10px; 436 right: 10px; 437 background: none; 438 border: 0; 439 padding: 0; 440 margin: 0; 441} 442 443.inside-modal .ui-hider img { 444 padding: 0; 445 margin: 0; 446} 447 448.inside-modal .ui-hider:hover { 449 cursor: pointer; 450} 451 452.gallery { 453 margin: 0; 454 padding: 0; 455} 456 457.gallery li { 458 list-style-type: none; 459 display: inline-block; 460 margin: 10px; 461 border: 5px solid #000; 462 position: relative; 463} 464 465.gallery button { 466 background: none; 467 border: 0; 468 padding: 0; 469} 470 471.gallery li img { 472 height: 50px; 473} 474 475.gallery button.delete { 476 position: absolute; 477 top: -10px; 478 right: -10px; 479} 480 481.gallery li .delete img { 482 height: 10px; 483 padding: 5px; 484 background-color: #fff; 485 border: 2px solid #000; 486} 487 488#finished-art { 489 max-width: 95%; 490 display: block; 491 border: 5px solid #000; 492 margin: 10px auto; 493 background: url("../assets/bg.png"); 494} 495 496#pxon-modal-container textarea { 497 width: 100%; 498 min-width: 500px; 499 min-height: 200px; 500} 501 502/* mobile */ 503@media only screen and (min-device-width: 320px) and (max-device-width: 568px) { 504 body { 505 font-size: 1em; 506 } 507 508 .ui-dragger { 509 display: none; 510 } 511 512 input { 513 font-size: 0.6em; 514 } 515 516 header { 517 width: 300px; 518 } 519 520 #toolbox input { 521 font-size: 0.8em; 522 } 523 524 #save-selection { 525 display: none; 526 } 527 528 h2 { 529 margin: 0.5em 0; 530 } 531} 532 533/* misc */ 534.hidden { 535 display: none !important; 536} 537 538.clearfix:after { 539 content: "."; 540 display: block; 541 clear: both; 542 visibility: hidden; 543 line-height: 0; 544 height: 0; 545} 546 547* html .clearfix { 548 height: 1%; 549}