You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

style.css 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. html, body {
  2. margin: 0px;
  3. height: 100%;
  4. }
  5. * {
  6. box-sizing: border-box;
  7. }
  8. #container {
  9. position: relative;
  10. margin: auto;
  11. text-align: center;
  12. width: 100%;
  13. max-width: 500px;
  14. height: 100%;
  15. }
  16. #add {
  17. padding-top: 12px;
  18. }
  19. #add .name,
  20. #add .submit {
  21. box-sizing: content-box;
  22. -webkit-appearance: none;
  23. font-size: 16px;
  24. border: 1px solid #aaa;
  25. border-radius: 5px;
  26. background-color: #fff;
  27. height: 20px;
  28. padding: 6px;
  29. line-height: 0px;
  30. }
  31. #add .name {
  32. width: 78%;
  33. border-top-right-radius: 0px;
  34. border-bottom-right-radius: 0px;
  35. }
  36. #add .submit {
  37. width: 8%;
  38. background-color: #eee;
  39. border-top-left-radius: 0px;
  40. border-bottom-left-radius: 0px;
  41. }
  42. #add .submit:hover {
  43. background-color: #ddd;
  44. }
  45. #add .suggestions {
  46. transition: opacity 0.2s;
  47. z-index: 2;
  48. background: white;
  49. box-shadow: 0px 0px 10px 1px #ccc;
  50. position: absolute;
  51. width: 90%;
  52. margin: auto;
  53. left: 0px;
  54. right: 0px;
  55. margin-top: 15px;
  56. padding-top: 6px;
  57. padding-bottom: 6px;
  58. max-height: 80%;
  59. overflow-y: auto;
  60. }
  61. #add .suggestions.hidden {
  62. opacity: 0;
  63. }
  64. #add .suggestions .suggestion:last-child {
  65. border-bottom: none;
  66. }
  67. #add .suggestions .suggestion {
  68. padding: 12px;
  69. cursor: pointer;
  70. border-bottom: 1px solid #ccc;
  71. }
  72. #list {
  73. margin-top: 24px;
  74. }
  75. #list .elem {
  76. transition: padding 0.3s, height 0.3s;
  77. padding-left: 12px;
  78. padding-top: 42px;
  79. position: relative;
  80. margin: auto;
  81. text-align: left;
  82. width: 100%;
  83. height: 70px;
  84. overflow: hidden;
  85. border-bottom: 1px solid #ccc;
  86. }
  87. #list .elem.hidden {
  88. transition: transform 0.3s ease-in,
  89. padding 0.2s 0.1s ease-in,
  90. height 0.2s 0.1s ease-in;
  91. transform: translateX(-150%);
  92. height: 0px;
  93. padding: 0px;
  94. }
  95. #list .elem .name {
  96. position: relative;
  97. }
  98. #list .elem .ok {
  99. position: relative;
  100. display: inline-block;
  101. float: right;
  102. margin-right: 6px;
  103. height: 50px;
  104. width: 50px;
  105. bottom: 33px;
  106. background-image: url(/icon-check.svg);
  107. background-size: 24px 24px;
  108. background-repeat: no-repeat;
  109. background-position: center;
  110. cursor: pointer;
  111. border-radius: 100px;
  112. background-color: #eee;
  113. }
  114. #list .elem .ok:hover {
  115. background-color: #ddd;
  116. }