Skip to content

Commit b18f913

Browse files
Chore/cleanup global css styles (#1191)
* remove input-base class * remove footer links custom styles from globals.css * remove focus-style-rounded class * remove unused rehype-code-title class
1 parent ac34024 commit b18f913

File tree

6 files changed

+12
-50
lines changed

6 files changed

+12
-50
lines changed

app/(editor)/create/[[...paramsArr]]/_client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ const Create = ({ session }: { session: Session | null }) => {
557557
type="button"
558558
className="relative flex w-full focus:outline-none focus:ring-2 focus:ring-pink-300 focus:ring-offset-2 active:hover:bg-neutral-50 disabled:opacity-50"
559559
>
560-
<div className="input-base flex max-w-full flex-1 overflow-hidden border text-left">
560+
<div className="flex w-full max-w-full flex-1 overflow-hidden border px-2 py-2 text-left text-black shadow-sm ring-offset-1 focus:border-pink-500 focus:outline-none focus:ring-2 focus:ring-neutral-300 disabled:opacity-50 dark:border-white dark:bg-black dark:text-white sm:text-sm">
561561
{PREVIEW_URL}
562562
</div>
563563
<div className="absolute bottom-0 right-0 top-0 w-[120px] border border-neutral-300 bg-white px-4 py-2 font-medium text-neutral-600 shadow-sm">

components/ArticleMenu/ArticleMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const ArticleMenu = ({
150150
</div>
151151

152152
<button
153-
className="focus-style-rounded rounded-full p-1 hover:bg-neutral-300 dark:hover:bg-neutral-800 lg:mx-auto"
153+
className="rounded-full p-1 hover:bg-neutral-300 focus:outline-none focus:ring-white focus-visible:ring-2 focus-visible:ring-pink-600 focus-visible:ring-offset-pink-600 dark:hover:bg-neutral-800 lg:mx-auto"
154154
aria-label="bookmark-trigger"
155155
onClick={() => {
156156
if (!session) {

components/ArticlePreview/ArticlePreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ const ArticlePreview: NextPage<Props> = ({
155155
<div className="flex gap-x-2">
156156
{showBookmark && (
157157
<button
158-
className="focus-style-rounded rounded-full p-2 hover:bg-neutral-300 dark:hover:bg-neutral-800 lg:mx-auto"
158+
className="rounded-full p-2 hover:bg-neutral-300 focus:outline-none focus:ring-white focus-visible:ring-2 focus-visible:ring-pink-600 focus-visible:ring-offset-pink-600 dark:hover:bg-neutral-800 lg:mx-auto"
159159
onClick={() => {
160160
if (!session) {
161161
return signIn();

components/Footer/Footer.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,25 @@ const navigation = {
1919
social: [
2020
{
2121
name: "Twitter",
22+
customStyle: "hover:bg-twitter focus:bg-twitter",
2223
href: twitterUrl,
2324
icon: Twitter,
2425
},
2526
{
2627
name: "GitHub",
28+
customStyle: "hover:bg-github focus:bg-github",
2729
href: githubUrl,
2830
icon: Github,
2931
},
3032
{
3133
name: "Discord",
34+
customStyle: "hover:bg-discord focus:bg-discord",
3235
href: discordInviteUrl,
3336
icon: Discord,
3437
},
3538
{
3639
name: "Youtube",
40+
customStyle: "hover:bg-youtube focus:bg-youtube",
3741
href: youtubeUrl,
3842
icon: Youtube,
3943
},
@@ -77,7 +81,7 @@ const Footer = () => {
7781
href={item.href}
7882
target="_blank"
7983
rel="noopener noreferrer"
80-
className={`focus-style rounded-md p-1 transition-all duration-300 hover:scale-105 hover:text-white hover:brightness-110 focus:scale-105 focus:text-white focus:brightness-110 ${item.name.toLowerCase()}`}
84+
className={`focus-style rounded-md p-1 transition-all duration-300 hover:scale-105 hover:text-white hover:brightness-110 focus:scale-105 focus:text-white focus:brightness-110 ${item.customStyle.toLowerCase()}`}
8185
>
8286
<span className="sr-only">{item.name}</span>
8387
<item.icon className="h-6 w-6" aria-hidden="true" />

styles/globals.css

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
@tailwind base;
22

3-
:root {
4-
--discord-clr: linear-gradient(to bottom, #4b83fb, #734df8);
5-
--youtube-clr: linear-gradient(to top, #6d0202 22%, #c90000 61%);
6-
--github-clr: #f17f06;
7-
--twitter-clr: #282828;
8-
}
9-
103
body {
114
@apply bg-neutral-100 text-neutral-900 dark:bg-black dark:text-white;
125
}
@@ -45,10 +38,6 @@ body {
4538
}
4639
}
4740

48-
.input-base {
49-
@apply block w-full border px-2 py-2 text-black shadow-sm ring-offset-1 focus:border-pink-500 focus:outline-none focus:ring-2 focus:ring-neutral-300 disabled:opacity-50 dark:border-white dark:bg-black dark:text-white sm:text-sm;
50-
}
51-
5241
.nav-button {
5342
@apply focus-style rounded-md px-2 py-2 text-neutral-900 hover:bg-neutral-200 hover:text-black focus:text-neutral-900 dark:text-neutral-300 dark:hover:bg-neutral-900 dark:hover:text-white dark:focus:text-white;
5443
}
@@ -57,10 +46,6 @@ body {
5746
@apply rounded-md focus:outline-none focus:ring-white focus-visible:ring-2 focus-visible:ring-pink-600 focus-visible:ring-offset-pink-600;
5847
}
5948

60-
.focus-style-rounded {
61-
@apply rounded-full focus:outline-none focus:ring-white focus-visible:ring-2 focus-visible:ring-pink-600 focus-visible:ring-offset-pink-600;
62-
}
63-
6449
.primary-button {
6550
@apply inline-flex justify-center rounded-md bg-gradient-to-r from-orange-400 to-pink-600 px-4 py-2 font-medium text-white shadow-sm hover:from-orange-300 hover:to-pink-500 focus:outline-none focus:ring-2 focus:ring-pink-600 focus:ring-offset-2 focus-visible:ring-2 focus-visible:ring-pink-600 focus-visible:ring-offset-white disabled:border-neutral-300 disabled:from-neutral-500 disabled:to-neutral-700 disabled:text-neutral-300 disabled:hover:text-neutral-300;
6651
}
@@ -253,18 +238,6 @@ pre {
253238
scrollbar-width: none; /* Firefox */
254239
}
255240

256-
.rehype-code-title {
257-
@apply rounded-t-lg border border-b-0 border-neutral-200 bg-neutral-200 px-5 py-3 font-mono text-sm font-bold text-neutral-800 dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-200;
258-
}
259-
260-
.rehype-code-title + pre {
261-
@apply mt-0 rounded-t-none;
262-
}
263-
264-
.highlight-line {
265-
@apply -mx-4 block border-l-4 border-blue-500 bg-neutral-100 px-4 dark:bg-neutral-800;
266-
}
267-
268241
/* Remove Safari input shadow on mobile */
269242
input[type="text"],
270243
input[type="email"] {
@@ -324,21 +297,6 @@ table div {
324297
animation: loader-dots3 0.6s infinite;
325298
}
326299

327-
/* Footer social hover effects */
328-
329-
.twitter {
330-
@apply hover:bg-twitter focus:bg-twitter;
331-
}
332-
.github {
333-
@apply hover:bg-github focus:bg-github;
334-
}
335-
.discord {
336-
@apply hover:bg-discord focus:bg-discord;
337-
}
338-
.youtube {
339-
@apply hover:bg-youtube focus:bg-youtube;
340-
}
341-
342300
/* end of plate editor styles */
343301

344302
@keyframes loader-dots1 {

tailwind.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ module.exports = {
88
extend: {
99
colors: {
1010
black: "#040404",
11-
twitter: "var(--twitter-clr)",
12-
github: "var(--github-clr)",
11+
twitter: "#282828",
12+
github: "#f17f06",
1313
},
1414
backgroundImage: {
15-
discord: "var(--discord-clr)",
16-
youtube: "var(--youtube-clr)",
15+
discord: "linear-gradient(to bottom, #4b83fb, #734df8)",
16+
youtube: "linear-gradient(to top, #6d0202 22%, #c90000 61%)",
1717
},
1818
},
1919
},

0 commit comments

Comments
 (0)