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.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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: 70%;
  59. overflow-y: auto;
  60. overflow-x: hidden;
  61. }
  62. #add .suggestions.hidden {
  63. opacity: 0;
  64. }
  65. #add .suggestions .suggestion:last-child {
  66. border-bottom: none;
  67. }
  68. #add .suggestions .suggestion {
  69. padding: 12px;
  70. cursor: pointer;
  71. border-bottom: 1px solid #ccc;
  72. text-overflow: ellipsis;
  73. max-width: 100%;
  74. overflow: hidden;
  75. }
  76. #list {
  77. margin-top: 24px;
  78. overflow: hidden;
  79. }
  80. #list .elem {
  81. transition: padding 0.3s, height 0.3s;
  82. padding-left: 12px;
  83. padding-top: 42px;
  84. position: relative;
  85. margin: auto;
  86. text-align: left;
  87. width: 100%;
  88. height: 70px;
  89. overflow: hidden;
  90. border-bottom: 1px solid #ccc;
  91. }
  92. #list .elem.hidden {
  93. transition: transform 0.3s ease-in,
  94. padding 0.2s 0.1s ease-in,
  95. height 0.2s 0.1s ease-in,
  96. border-width 0s 0.2s;
  97. transform: translateX(-150%);
  98. height: 0px;
  99. padding: 0px;
  100. border-width: 0px;
  101. }
  102. #list .elem .name {
  103. position: relative;
  104. display: inline-block;
  105. max-width: calc(100% - 60px);
  106. overflow: hidden;
  107. text-overflow: ellipsis;
  108. }
  109. #list .elem .ok {
  110. position: relative;
  111. display: inline-block;
  112. float: right;
  113. margin-right: 6px;
  114. height: 50px;
  115. width: 50px;
  116. bottom: 33px;
  117. background-image: url(/icon-check.svg);
  118. background-size: 24px 24px;
  119. background-repeat: no-repeat;
  120. background-position: center;
  121. cursor: pointer;
  122. border-radius: 100px;
  123. background-color: #eee;
  124. }
  125. #list .elem .ok:hover {
  126. background-color: #ddd;
  127. }