+page.svelte 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <form>
  2. <input type="text" placeholder="Search Recipes">
  3. <button>
  4. <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" color="#000000">
  5. <path d="M17 17L21 21" stroke="#ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
  6. <path d="M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z" stroke="#ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
  7. </svg>
  8. </button>
  9. </form>
  10. <style>
  11. form{
  12. display: flex;
  13. align-items: center;
  14. justify-content: center;
  15. gap: 0.5rem;
  16. width: min(480px, 90vw);
  17. margin: 40vh auto 0;
  18. padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  19. background: #ffffff;
  20. border-radius: 999px;
  21. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  22. }
  23. input[type="text"]{
  24. flex: 1;
  25. border: none;
  26. outline: none;
  27. background: none;
  28. font-size: 1rem;
  29. color: #000000;
  30. }
  31. button{
  32. display: flex;
  33. align-items: center;
  34. justify-content: center;
  35. width: 2.5rem;
  36. height: 2.5rem;
  37. background: #000000;
  38. border: none;
  39. border-radius: 50%;
  40. cursor: pointer;
  41. flex-shrink: 0;
  42. transition: background 0.15s ease, transform 0.1s ease;
  43. }
  44. button:hover{
  45. background: #333333;
  46. }
  47. button:active{
  48. background: #555555;
  49. transform: scale(0.92);
  50. }
  51. </style>