Skip to content

Commit

Permalink
Fix warnings and deprecations after updating tailwindcss (#213)
Browse files Browse the repository at this point in the history
* update content directive, flex-grow -> grow

* fix flex behaviour and circular dependency

* remove grow from css
  • Loading branch information
joschahenningsen committed Jan 5, 2022
1 parent ed53f1b commit 5ab5a1f
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 15 deletions.
3 changes: 1 addition & 2 deletions web/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ input[type='checkbox']:checked + label {
}

.dark .fc-scroller {
@apply scrollbarThin;
margin-bottom: 0 !important;
}

Expand Down Expand Up @@ -268,4 +267,4 @@ a.fc-event, a.fc-event:hover {

[x-cloak] {
display: none !important;
}
}
2 changes: 1 addition & 1 deletion web/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// eslint-disable-next-line no-undef
module.exports = {
purge: [
content: [
"./assets/css/*.css",
"./template/**/*.gohtml",
"./template/**/**/*.gohtml",
Expand Down
4 changes: 2 additions & 2 deletions web/template/admin/admin.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
{{end}}
<li class="mt-8"><span
class="mb-3 lg:mb-3 uppercase tracking-wide font-semibold text-sm lg:text-xs text-2 flex">
<span class="flex-grow">Courses</span><a href="/admin/create-course"><i
<span class="grow">Courses</span><a href="/admin/create-course"><i
class="fas fa-plus"></i></a></span>
<ul>
<li>
Expand Down Expand Up @@ -146,7 +146,7 @@
{{end}}
<li class="mt-8"><span
class="mb-3 lg:mb-3 uppercase tracking-wide font-semibold text-sm lg:text-xs text-2 flex">
<span class="flex-grow">Courses</span><a href="/admin/create-course"><i
<span class="grow">Courses</span><a href="/admin/create-course"><i
class="fas fa-plus"></i></a></span>
<ul>
<li>
Expand Down
4 changes: 2 additions & 2 deletions web/template/admin/admin_tabs/edit-course.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
title</label>
<input id="lectureNameInput{{$lecture.Model.ID}}"
onfocus="focusNameInput(this, {{$lecture.Model.ID}})"
class="flex-grow border-none" type="text" value="{{$lecture.Name}}"
class="grow border-none" type="text" value="{{$lecture.Name}}"
placeholder="Lecture 2: Dark-Patterns I"
autocomplete="off">
<button id="nameSubmitBtn{{$lecture.Model.ID}}"
Expand All @@ -139,7 +139,7 @@
class="hidden">Lecture description</label>
<textarea id="lectureDescriptionInput{{$lecture.Model.ID}}"
onfocus="focusDescriptionInput(this, {{$lecture.Model.ID}})"
class="flex-grow border-none"
class="grow border-none"
placeholder="Add a nice description, links, and more. You can use Markdown."
autocomplete="off">{{$lecture.Description}}</textarea>
<button id="descriptionSubmitBtn{{$lecture.Model.ID}}"
Expand Down
4 changes: 2 additions & 2 deletions web/template/header.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
d="M49.986,7v31h8V7h37v38h-7V14h-8v31h-7V14h-8v31h-22V14h-7v31h-7V14h-7V7H49.986z"></path>
</svg>
</a>
<div class="block flex-grow flex items-center w-auto">
<div class="text-sm flex-grow">
<div class="block grow flex items-center w-auto">
<div class="text-sm grow">
<a href="/"
class="block inline-block align-middle mt-0 mr-4 hover:text-white text-gray-400">
Start
Expand Down
2 changes: 1 addition & 1 deletion web/template/partial/stream/chat.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{range $chat := $stream.Chats}}
<div class="rounded p-2 mx-2">
<div class="flex flex-row">
<p class="flex-grow font-semibold {{if $chat.Admin}}text-warn{{end}}">{{$chat.UserName}}</p>
<p class="grow font-semibold {{if $chat.Admin}}text-warn{{end}}">{{$chat.UserName}}</p>
<p class="text-4">
{{printf "%02d:%02d" $chat.CreatedAt.Hour $chat.CreatedAt.Minute}}
</p>
Expand Down
2 changes: 1 addition & 1 deletion web/template/watch.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</p>
</video>
<div class="flex justify-between align-middle mt-4">
<h1 class="text-4 text-xl flex-grow">
<h1 class="text-4 text-xl grow">
{{if $stream.Name}}
{{$stream.Name}}
{{else}}
Expand Down
6 changes: 3 additions & 3 deletions web/ts/schedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ document.addEventListener("DOMContentLoaded", function () {
const streamInfo = JSON.parse(Get("/api/stream/" + data.event.extendedProps.description));
popover.innerHTML = `;
<p class="flex text-1 text-lg">
<span class="flex-grow">${streamInfo["course"]}</span>
<span class="grow">${streamInfo["course"]}</span>
<i id="closeBtn" class="transition-colors duration-200 hover:text-1 text-4 icon-close"></i>
</p>
<div class="text-2">
Expand All @@ -46,7 +46,7 @@ document.addEventListener("DOMContentLoaded", function () {
<label for="lectureNameInput${streamInfo["streamID"]}" class="hidden">Lecture title</label>
<input id="lectureNameInput${streamInfo["streamID"]}"
onfocus="focusNameInput(this, ${streamInfo["streamID"]})"
class="flex-grow border-none" type="text" value="${streamInfo["name"]}"
class="grow border-none" type="text" value="${streamInfo["name"]}"
placeholder="Lecture 2: Dark-Patterns I"
autocomplete="off">
<button id="nameSubmitBtn${streamInfo["streamID"]}"
Expand All @@ -60,7 +60,7 @@ document.addEventListener("DOMContentLoaded", function () {
<textarea id="lectureDescriptionInput${streamInfo["streamID"]}"
rows="3"
onfocus="focusDescriptionInput(this, ${streamInfo["streamID"]})"
class="flex-grow border-none"
class="grow border-none"
placeholder="Add a nice description, links, and more. You can use Markdown."
autocomplete="off">${streamInfo["description"]}</textarea>
<button id="descriptionSubmitBtn${streamInfo["streamID"]}"
Expand Down
2 changes: 1 addition & 1 deletion web/ts/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function createMessageElement(m): HTMLDivElement {
const chatHeader = document.createElement("div") as HTMLDivElement;
chatHeader.classList.add("flex", "flex-row");
const chatNameField = document.createElement("p") as HTMLParagraphElement;
chatNameField.classList.add("flex-grow", "font-semibold");
chatNameField.classList.add("grow", "font-semibold");
if (m["admin"]) {
chatNameField.classList.add("text-warn");
}
Expand Down

0 comments on commit 5ab5a1f

Please sign in to comment.