Skip to content

Commit d7f1036

Browse files
hussamkhatibgupta-ji6hussamkhatib
authored
build(tailwind): upgrade tailwind to v3.1.6 (#88)
* upgrade: tailwind to v3 remove purgeCSS and use lookup table for dynamic classes. * upgrade tailwind to 3.1.6 (#87) * fix(global.css): replace @Variants with @layer * chore(package): bump release version * fix(next.config): resolve warning - Disabled SWC because of custom Babel configuration ".babelrc" * build(sharp): added sharp for image optimization in prod https://nextjs.org/docs/messages/sharp-missing-in-production * style: rollback to arbitary values for variants to normal classes * refactor: remove babel config as it is not required Co-authored-by: Ayush Gupta <ayushgupta197@gmail.com> Co-authored-by: hussamkhatib <hussamkhatib@gmail.com>
1 parent 2e9c342 commit d7f1036

22 files changed

Lines changed: 444 additions & 404 deletions

.babelrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

components/Curators.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ function Curators(): JSX.Element {
7676
return (
7777
<div className="flex sm:flex-col md:flex-row flex-wrap pb-8" key={index}>
7878
<div
79-
className={`flex-shrink-1 mr-4 mb-4 p-1 bg-gradient-to-br from-${theme}-300 to-${theme}-700 rounded transition duration-300`}
79+
className={`shrink mr-4 mb-4 p-1 bg-gradient-to-br from-${theme}-300 to-${theme}-700 rounded transition duration-300`}
8080
>
8181
<div className={`bg-${theme}-100 p-1 rounded`}>
8282
<a
8383
href={curator.links.website}
8484
target="_blank"
8585
rel="noreferrer"
86-
className="flex transform transition duration-700 hover:scale-105"
86+
className="flex transition duration-700 hover:scale-105"
8787
aria-label={`Open ${curator.name} website.`}
8888
>
8989
<Image

components/DevOfTheWeekItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const DevOfTheWeekItem = ({
2121
href={profileLink.website}
2222
target="_blank"
2323
rel="noreferrer"
24-
className="flex transform transition duration-700 hover:scale-105"
24+
className="flex transition duration-700 hover:scale-105"
2525
aria-label={name}
2626
>
2727
<Image

components/FeatureSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const FeatureSection = (): JSX.Element => {
5454
const theme = useThemeState();
5555
return (
5656
<div className="py-12">
57-
<div className="max-w-screen-2xl mx-auto px-8 sm:px-16 md:px-40 lg:px-64">
57+
<div className="px-8 mx-auto max-w-screen-2xl sm:px-16 md:px-40 lg:px-64">
5858
<div className="lg:text-center">
5959
<Text
6060
additionalStyles="pt-2 text-3xl leading-8 font-extrabold tracking-wide sm:text-4xl md:text-5xl sm:leading-10 text-shadow"
@@ -81,7 +81,7 @@ const FeatureSection = (): JSX.Element => {
8181
<li key={feature.name} className="py-4 pr-4 lg:pr-8 mb-4 flex justify-center">
8282
<div className="flex">
8383
<div
84-
className={`flex flex-shrink-0 items-center justify-center h-16 w-16 rounded-md text-${theme}-100 bg-gradient-to-br from-${theme}-600 to-${theme}-800 transition-all hover:animate-spring-bounce`}
84+
className={`flex shrink-0 items-center justify-center h-16 w-16 rounded-md text-${theme}-100 bg-gradient-to-br from-${theme}-600 to-${theme}-800 transition-all hover:animate-spring-bounce`}
8585
>
8686
{feature.icon}
8787
</div>

components/Footer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const Footer = (): JSX.Element => {
2323
<footer
2424
className={`flex mt-auto justify-between px-16 lg:px-32 py-5 bg-gradient-to-b from-${theme}-100 to-${theme}-300 flex-col lg:flex-row`}
2525
>
26-
<div className="flex items-center flex-shrink-0 lg:mr-6 flex-col lg:flex-row">
26+
<div className="flex items-center shrink-0 lg:mr-6 flex-col lg:flex-row">
2727
<Link href="/">
2828
<a aria-current="page" className="hover:no-underline flex items-center pb-3 lg:pb-0">
2929
<ScriptifiedLogo color={`text-${theme}-900`} additionalStyles="w-6 h-6" />
@@ -40,7 +40,7 @@ const Footer = (): JSX.Element => {
4040
</div>
4141

4242
<div className="flex items-center flex-col lg:flex-row">
43-
<ul className="flex px-8 items-center justify-center m-0 flex-wrap ">
43+
<ul className="flex px-8 items-center justify-center m-0 flex-wrap">
4444
<li className="p-0">
4545
<Link href="/">
4646
<a className="hover:underline text-pom p-2 inline-flex items-center">

components/Quiz.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ const Option = ({
7979
const DEFAULT_BACKGROUND = `bg-gradient-to-br from-${theme}-100 to-${theme}-200`;
8080
const DEFAULT_BORDER = `border-${theme}-300`;
8181

82-
const CORRECT_ANSWER_BACKGROUND = `bg-gradient-to-br from-green-100 to-green-300 transition-none transform-none`;
83-
const CORRECT_ANSWER_BORDER = `border-green-700`;
82+
const CORRECT_ANSWER_BACKGROUND = `bg-gradient-to-br from-emarald-100 to-emerald-300 transition-none transform-none`;
83+
const CORRECT_ANSWER_BORDER = `border-emerald-700`;
8484

8585
const WRONG_ANSWER_BACKGROUND = 'bg-gradient-to-br from-red-100 to-red-300 transition-none transform-none';
8686
const WRONG_ANSWER_BORDER = 'border-red-700';
@@ -99,7 +99,7 @@ const Option = ({
9999
const background = isShowingDetailView ? answeredBackground : DEFAULT_BACKGROUND;
100100
const border = isShowingDetailView ? answeredBorder : normalBorder;
101101
const additionalStyles = !(isDisabled || isShowingDetailView)
102-
? `cursor-pointer ${HOVER_BORDER} transition-all transform ease-in-out duration-500 hover:scale-105 focus:scale-105`
102+
? `cursor-pointer ${HOVER_BORDER} transition-all ease-in-out duration-500 hover:scale-105 focus:scale-105`
103103
: '';
104104

105105
const handleSelect = () => {
@@ -118,7 +118,7 @@ const Option = ({
118118
{isShowingDetailView && (
119119
<>
120120
{isCorrectAnswer ? (
121-
<CheckCircleIcon color="text-green-500 absolute top-1/2 left-1" />
121+
<CheckCircleIcon color="text-emerald-500 absolute top-1/2 left-1" />
122122
) : (
123123
<XCircleIcon color="text-red-500 absolute top-1/2 left-1" />
124124
)}

components/ToolItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const ToolItem = ({ tool: { title, url, logo, authors, desc, tags } }: { tool: T
99
<div className="flex flex-wrap sm:flex-nowrap flex-row items-center">
1010
<a
1111
href={url}
12-
className="w-full mr-8 max-w-fc my-4 p-1 transform transition duration-700 hover:scale-105 img-shadow-sm hover:img-shadow-none"
12+
className="w-full mr-8 max-w-[fit-content] my-4 p-1 transition duration-700 hover:scale-105 img-shadow-sm hover:img-shadow-none"
1313
target="_blank"
1414
rel="noreferrer"
1515
aria-label={title}

components/common/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function Button({
3030
<button className={styles} onClick={onClick} {...buttonAttributes} disabled={loading}>
3131
{loading && (
3232
<svg
33-
className="animate-spin -ml-1 mr-3 h-6 w-6 flex-shrink-0 text-white mt-1"
33+
className="animate-spin -ml-1 mr-3 h-6 w-6 shrink-0 text-white mt-1"
3434
xmlns="http://www.w3.org/2000/svg"
3535
fill="none"
3636
viewBox="0 0 24 24"

components/common/FloatingShareButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const FloatingShareButton = ({ url = '', title = '' }: FloatingShareButtonProps)
6666
style={{ opacity: btnOpacity }}
6767
>
6868
<button
69-
className={`animate-spin-slow transition duration-500 ease-in-out transform hover:scale-110 rounded-full p-4 inline-flex items-center justify-center`}
69+
className={`animate-spin-slow transition duration-500 ease-in-out hover:scale-110 rounded-full p-4 inline-flex items-center justify-center`}
7070
onClick={shareExternal}
7171
>
7272
<ShareIcon color={`text-${theme}-100`} />

components/common/IssueListItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const IssueListItem = ({ issueData }: { issueData: Meta }): JSX.Element => {
1212
return (
1313
<div className={`flex py-8 pr-2 max-w-3xl md:border-0 border-b border-${theme}-500`} key={number}>
1414
<div className="h-full flex md:flex-row flex-col items-start">
15-
<div className="w-24 flex-shrink-0 flex-grow flex md:flex-col text-center leading-none mb-2">
15+
<div className="w-24 shrink-0 grow flex md:flex-col text-center leading-none mb-2">
1616
<span className={`text-${theme}-700 text-lg md:mr-0 mr-2 font-bold md:order-2 uppercase`}>Issue</span>
1717
<span
1818
// eslint-disable-next-line max-len

0 commit comments

Comments
 (0)