Skip to content

Commit 2cf8daf

Browse files
joedixonfaissaloux
andauthored
Upgrade tailwind to v3 (#795)
* update dependencies * update classes * remove classes duplication * resolve conflict * Remove dependency Co-authored-by: faissaloux <[email protected]>
1 parent 38db022 commit 2cf8daf

22 files changed

+561
-529
lines changed

package-lock.json

Lines changed: 514 additions & 477 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,17 @@
1010
"production": "mix --production"
1111
},
1212
"devDependencies": {
13+
"@tailwindcss/aspect-ratio": "^0.2.0",
14+
"@tailwindcss/forms": "^0.4.0",
15+
"@tailwindcss/typography": "^0.5.0",
16+
"autoprefixer": "^10.4.0",
1317
"axios": "^0.21.4",
1418
"highlight.js": "^10.5.0",
1519
"laravel-mix": "^6.0.23",
16-
"vue-template-compiler": "^2.6.12"
17-
},
18-
"dependencies": {
19-
"@tailwindcss/aspect-ratio": "^0.2.0",
20-
"@tailwindcss/forms": "^0.2.1",
21-
"@tailwindcss/typography": "^0.4.0",
20+
"postcss": "^8.4.5",
21+
"tailwindcss": "^3.0.2",
2222
"algoliasearch": "^4.8.4",
2323
"alpinejs": "^3.0",
24-
"autoprefixer": "^10.2.4",
25-
"choices.js": "^9.0.1",
26-
"postcss": "^8.2.10",
27-
"tailwindcss": "^2.0.2"
24+
"choices.js": "^9.0.1"
2825
}
29-
}
26+
}

resources/css/buttons.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
.button-primary {
10-
@apply text-white bg-lio-500;
10+
@apply text-white bg-lio-500 !important;
1111
}
1212

1313
.button-primary:hover {

resources/views/admin/articles.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<tr>
3232
<x-tables.table-data>
3333
<div class="flex items-center">
34-
<div class="flex-shrink-0 h-10 w-10">
34+
<div class="shrink-0 h-10 w-10">
3535
<x-avatar :user="$article->author()" class="h-10 w-10 rounded-full"/>
3636
</div>
3737
<div class="ml-4">

resources/views/admin/partials/_navigation.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="border-b border-gray-200">
2-
<div class="sm:flex sm:items-center sm:justify-between sm:items-baseline">
3-
<div class="sm:flex sm:items-center sm:justify-between sm:items-baseline">
2+
<div class="sm:flex sm:justify-between sm:items-baseline">
3+
<div class="sm:flex sm:justify-between sm:items-baseline">
44
<h3 class="text-lg leading-6 font-medium text-gray-900">
55
Admin
66
</h3>
@@ -23,7 +23,7 @@
2323
<label for="adminSearch" class="sr-only">Search</label>
2424

2525
<div class="flex rounded-md shadow-sm">
26-
<div class="relative flex-grow">
26+
<div class="relative grow">
2727
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
2828
<x-heroicon-s-search class="h-5 w-5 text-gray-400" />
2929
</div>

resources/views/admin/users.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<tr>
3131
<x-tables.table-data>
3232
<div class="flex items-center">
33-
<div class="flex-shrink-0 h-10 w-10">
33+
<div class="shrink-0 h-10 w-10">
3434
<x-avatar :user="$user" class="h-10 w-10 rounded-full" />
3535
</div>
3636

resources/views/articles/overview.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
Share your article with <a href="https://twitter.com/laravelio" class="text-lio-500 hover:text-lio-600 hover:underline">our 45,000 Twitter followers</a>.
1919
</span>
2020
</h2>
21-
<div class="mt-8 flex lg:mt-0 lg:flex-shrink-0">
21+
<div class="mt-8 flex lg:mt-0 lg:shrink-0">
2222
<div class="inline-flex rounded-md shadow">
2323
<x-buttons.primary-button href="{{ route('articles.create') }}" class="px-5 py-3 text-base font-medium">
2424
Share Your Article
@@ -46,7 +46,7 @@
4646
<div class="hidden lg:flex gap-x-2">
4747
<x-articles.filter :selectedFilter="$filter" :activeTag="$activeTag" />
4848

49-
<div class="flex-shrink-0">
49+
<div class="shrink-0">
5050
<x-buttons.secondary-button class="flex items-center gap-x-2" @click="activeModal = 'tag-filter'">
5151
<x-heroicon-o-filter class="w-5 h-5" />
5252
Tag filter

resources/views/articles/show.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="container mx-auto">
1111
<div class="px-4 lg:px-0 lg:mx-48">
1212
<div class="flex items-center justify-between pt-6 mb-28">
13-
<a href="{{ route('articles') }}" class="hidden flex items-center text-base text-white hover:underline lg:flex">
13+
<a href="{{ route('articles') }}" class="hidden items-center text-base text-white hover:underline lg:flex">
1414
<x-heroicon-s-arrow-left class="w-4 h-4 fill-current" />
1515
<span class="text-white ml-1 hover:text-gray-100">Back to articles</span>
1616
</a>
@@ -106,7 +106,7 @@ class="prose prose-lg text-gray-800 prose-lio"
106106
<div class="border-t-2 border-gray-200 py-8 lg:pt-14 lg:pb-16">
107107
<div class="flex flex-col items-center justify-center gap-y-4 lg:flex-row lg:justify-between">
108108
<div class="flex items-start gap-x-4">
109-
<div class="flex-shrink-0">
109+
<div class="shrink-0">
110110
<x-avatar :user="$article->author()" class="hidden w-16 h-16 lg:block" />
111111
</div>
112112

resources/views/components/articles/form.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</div>
3030

3131
<div class="flex flex-col space-y-6">
32-
<div class="flex-grow space-y-6">
32+
<div class="grow space-y-6">
3333
<div class="space-y-1">
3434
<x-forms.label for="title">Title</x-forms.label>
3535

@@ -41,7 +41,7 @@
4141
</div>
4242
</div>
4343

44-
<div class="flex-grow space-y-6">
44+
<div class="grow space-y-6">
4545
<div class="space-y-1">
4646
<x-forms.label for="body">Body</x-forms.label>
4747

@@ -51,8 +51,8 @@
5151
</div>
5252
</div>
5353

54-
<div class="flex-grow space-y-6">
55-
<div class="flex-grow space-y-6">
54+
<div class="grow space-y-6">
55+
<div class="grow space-y-6">
5656
<div class="space-y-1">
5757
<x-forms.label for="original_url">Original URL</x-forms.label>
5858

@@ -64,7 +64,7 @@
6464
</div>
6565
</div>
6666

67-
<div class="flex-grow space-y-6">
67+
<div class="grow space-y-6">
6868
<div class="space-y-1">
6969
<x-forms.label for="tags">Tags</x-forms.label>
7070

resources/views/components/articles/summary.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'isFeatured' => false,
44
])
55

6-
<div class="h-full flex flex-1 flex-col flex-grow place-content-between">
6+
<div class="h-full flex flex-1 flex-col grow place-content-between">
77
<div class="break-words">
88
@if ($isFeatured)
99
<a href="{{ route('articles.show', $article->slug()) }}">

0 commit comments

Comments
 (0)