irongit

fixed text shadow plugin

huncholanehuncholaneauthored
parent f97aaeccommit 670ff69314ad3c1cf57fbaba8e11b9f44edb6dc2Browse files

3 files changed, +23 -11

+14-4twench_landing_page/components/LandingSection/LandingSection.css
@@ -6,22 +6,32 @@
66 overflow-x: hidden;
77 }
88
9-.LandingTank {
9+.LandingSection .Tank {
1010 background: url("/images/tank.png") no-repeat center center;
1111 background-size: auto 100%;
1212 @apply absolute bottom-0 left-0 w-full;
1313 @apply md:top-52 xs:top-44 top-40;
1414 }
1515
16-.LandingSoldier {
16+.LandingSection .Soldier {
1717 background: url("/images/soldier.png") no-repeat center center;
1818 background-size: auto 100%;
1919 @apply absolute bottom-0 right-0 w-full;
2020 @apply md:top-60 xs:top-52 top-48;
2121 }
2222
23-.LandingTitle {
24- @apply text-[150px] text-center w-full absolute md:top-32 leading-none text-shadow-lg;
23+.LandingSection .Title {
24+ @apply text-[150px] text-center w-full absolute md:top-32 leading-none;
2525 @apply md:text-[150px] xs:text-[100px] text-[69px];
26+ @apply md:text-shadow-lg xs:text-shadow-md text-shadow;
2627 @apply top-32;
2728 }
29+
30+.LandingSection .OpenGameButton {
31+ @apply rounded-full absolute leading-none text-black bottom-8 text-shadow-none;
32+ @apply py-3 px-8;
33+ @apply border-black border-4;
34+ @apply bg-white hover:bg-background cursor-pointer;
35+ @apply right-[100px] lg:right-[200px];
36+ @apply text-[20px] lg:text-[50px];
37+}
+4-3twench_landing_page/components/LandingSection/LandingSection.tsx
@@ -5,9 +5,10 @@ import "./LandingSection.css";
55 const LandingSection = () => {
66 return (
77 <div className="LandingSection">
8- <div className="LandingTitle">$TWENCH</div>
9- <div className="LandingTank"></div>
10- <div className="LandingSoldier"></div>
8+ <div className="Title">$TWENCH</div>
9+ <div className="Tank"></div>
10+ <div className="Soldier"></div>
11+ <div className="OpenGameButton">OPEN GAME</div>
1112 </div>
1213 );
1314 };
+5-4twench_landing_page/plugins/text-shadow.ts
@@ -2,10 +2,10 @@ import { text } from "stream/consumers";
22 import plugin from "tailwindcss/plugin";
33
44 function textShadow(value: string) {
5- return {
6- textShadow: `${value} ${value} 0 #000, -${value} -${value} 0 #000, ${value} -${value} 0 #000,
7- -${value} ${value} 0 #000, ${value} 0 0 #000, -${value} 0 0 #000, 0 ${value} 0 #000, 0 -${value} 0 #000;`,
8- };
5+ if (!value) {
6+ return "none";
7+ }
8+ return `${value} ${value} 0 #000, -${value} -${value} 0 #000, ${value} -${value} 0 #000, -${value} ${value} 0 #000, ${value} 0 0 #000, -${value} 0 0 #000, 0 ${value} 0 #000, 0 -${value} 0 #000`;
99 }
1010
1111 const textShadowPlugin = plugin(
@@ -25,6 +25,7 @@ const textShadowPlugin = plugin(
2525 theme: {
2626 textShadow: {
2727 DEFAULT: "1px",
28+ none: "0",
2829 sm: "2px",
2930 md: "3px",
3031 lg: "4px",