Skip to content

Commit d9723d1

Browse files
committed
Replace scoped CSS with Tailwind
1 parent ae26636 commit d9723d1

File tree

3 files changed

+58
-143
lines changed

3 files changed

+58
-143
lines changed

public/css/app.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,6 +1205,10 @@ video {
12051205
border-width: 0px;
12061206
}
12071207

1208+
.border-2 {
1209+
border-width: 2px;
1210+
}
1211+
12081212
.border-t-2 {
12091213
border-top-width: 2px;
12101214
}
@@ -1401,6 +1405,11 @@ video {
14011405
padding-bottom: 4rem;
14021406
}
14031407

1408+
.px-3 {
1409+
padding-left: 0.75rem;
1410+
padding-right: 0.75rem;
1411+
}
1412+
14041413
.pb-12 {
14051414
padding-bottom: 3rem;
14061415
}
@@ -1643,6 +1652,10 @@ video {
16431652
transition-duration: 700ms;
16441653
}
16451654

1655+
.duration-300 {
1656+
transition-duration: 300ms;
1657+
}
1658+
16461659
.ease-in-out {
16471660
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
16481661
}
@@ -1707,6 +1720,11 @@ video {
17071720
border-color: rgb(99 102 241 / var(--tw-border-opacity));
17081721
}
17091722

1723+
.focus\:border-blue-500:focus {
1724+
--tw-border-opacity: 1;
1725+
border-color: rgb(59 130 246 / var(--tw-border-opacity));
1726+
}
1727+
17101728
.focus\:outline-none:focus {
17111729
outline: 2px solid transparent;
17121730
outline-offset: 2px;

public/js/app.js

Lines changed: 32 additions & 113 deletions
Large diffs are not rendered by default.

resources/js/components/Header/Search.vue

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
<template>
2-
<label for="search-input" class="search-label"> Search: </label>
3-
<input class="search-input" type="text" v-model="searchTerm" @input="searchProducts" />
4-
<div v-if="data && data.length > 0">
1+
<template>
2+
<input
3+
class="w-full px-3 py-2 my-2 border-2 border-gray-300 rounded-md text-sm focus:border-blue-500 focus:outline-none transition-all duration-300"
4+
type="text"
5+
v-model="searchTerm"
6+
placeholder="Search"
7+
>
8+
<div v-if="data && data.length > 0 && searchTerm.length > 0">
59
<div
610
class="flex justify-center absolute bg-white left-0 right-0 h-auto mx-auto py-16 px-8 shadow-md overflow-y-auto overflow-x-hidden scrolling-touch z-50 max-w-screen-md">
711
<div class="w-full">
@@ -49,29 +53,3 @@ const { data } = useSWRV(
4953
fetcher
5054
);
5155
</script>
52-
53-
<style scoped>
54-
.search-label {
55-
font-size: 1.2rem;
56-
font-weight: bold;
57-
margin-bottom: 0.5rem;
58-
text-align: left;
59-
}
60-
61-
.search-input {
62-
width: 100%;
63-
padding: 6px 10px;
64-
margin: 8px 0;
65-
box-sizing: border-box;
66-
border: 2px solid #ccc;
67-
border-radius: 2px;
68-
font-size: 14px;
69-
background-color: white;
70-
transition: 0.3s;
71-
}
72-
73-
.search-input:focus {
74-
border-color: #007bff;
75-
outline: none;
76-
}
77-
</style>

0 commit comments

Comments
 (0)