dp-light.css 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* (A) WRAPPER - POPUP MODE */
  2. .picker-wrap, .picker-wrap * { box-sizing: border-box; }
  3. .picker-wrap.popup {
  4. /* (A1) FULLSCREEN COVER */
  5. position: fixed;
  6. top: 0; left: 0; z-index: 99;
  7. width: 100vw; height: 100vh;
  8. /* (A2) BACKGROUND + HIDE BY DEFAULT */
  9. background: rgba(0, 0, 0, 0.5);
  10. opacity: 0; visibility: hidden;
  11. transition: opacity 0.2s;
  12. /* (A3) CENTER DATE PICKER */
  13. display: flex;
  14. align-items: center;
  15. justify-content: center;
  16. }
  17. /* (A4) SHOW POPUP */
  18. .picker-wrap.show {
  19. opacity: 1;
  20. visibility: visible;
  21. }
  22. /* (B) CONTAINER */
  23. .picker {
  24. max-width: 300px;
  25. border: 1px solid #eee;
  26. background: #fafafa;
  27. padding:1.2em;
  28. border-radius: 0.4em;
  29. }
  30. /* (C) PERIOD SELECTOR */
  31. .picker-p {
  32. width: 100%;
  33. display: flex;
  34. background: #fff;
  35. }
  36. .picker-b, .picker-n {
  37. font-weight: 700;
  38. padding: 10px;
  39. background: #e7e7e7;
  40. cursor: pointer;
  41. }
  42. .picker-m:focus, .picker-y:focus { outline: none; }
  43. .picker-m, .picker-y {
  44. flex-grow: 1;
  45. padding: 10px;
  46. border: 0;
  47. background: none;
  48. }
  49. /* (D) DAYS IN MONTH */
  50. /* (D1) GRID LAYOUT */
  51. .picker-d {
  52. display: grid;
  53. grid-template-columns: repeat(7, minmax(0, 1fr));
  54. }
  55. .picker-d div { padding: 5px; }
  56. /* (D2) HEADER - DAY NAMES */
  57. .picker-d-h { font-weight: 700; }
  58. /* (D3) BLANK DATES */
  59. .picker-d-b { background: #e7e7e7; }
  60. /* (D4) TODAY */
  61. .picker-d-td { background: #ffe5e5; }
  62. /* (D5) PICKABLE DATES */
  63. .picker-d-d:hover {
  64. cursor: pointer;
  65. background: #2d68c4;
  66. color: #fff;
  67. }
  68. /* (D6) UNPICKABLE DATES */
  69. .picker-d-dd {
  70. color: #aaa;
  71. background: #ddd;
  72. }