From d5bda524c39ef50398eabe3cb148e508a869418e Mon Sep 17 00:00:00 2001 From: rebeccahongsf Date: Thu, 12 Sep 2024 17:43:00 -0700 Subject: [PATCH 01/15] SUM-253 | add heading size option --- .../stanford-card/card-paragraph.tsx | 23 ++++++++++++++++++- src/lib/drupal/drupal-jsonapi.d.tsx | 1 + 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/components/paragraphs/stanford-card/card-paragraph.tsx b/src/components/paragraphs/stanford-card/card-paragraph.tsx index 30db47fa..9618b633 100644 --- a/src/components/paragraphs/stanford-card/card-paragraph.tsx +++ b/src/components/paragraphs/stanford-card/card-paragraph.tsx @@ -14,6 +14,23 @@ type Props = HtmlHTMLAttributes & { paragraph: ParagraphStanfordCard } +const adjustHeadingType = (size: "larger" | "smaller" | "default" | undefined, heading: string): string => { + const headingTypes: {[key: string]: number} = { + h2: 4, + h3: 3, + h4: 2, + } + if (!headingTypes[heading] || !size || size === "default") return "" + let type = headingTypes[heading] + if (size === "larger") { + type += 1 + } else if (size === "smaller") { + type -= 1 + } + + return `type-${type}` +} + const CardParagraph = ({paragraph, ...props}: Props) => { const behaviors = getParagraphBehaviors(paragraph) @@ -22,8 +39,12 @@ const CardParagraph = ({paragraph, ...props}: Props) => { paragraph.suCardMedia?.__typename === "MediaVideo" ? paragraph.suCardMedia.mediaOembedVideo : undefined const headerTagChoice = (behaviors.su_card_styles?.heading || "h2").split(".", 2) + const headerSize = behaviors.su_card_styles?.sum_card_heading_size const headerTag = headerTagChoice[0] - const headerClasses = headerTagChoice[1]?.replace(".", " ").replace("su-font-splash", "type-3 mb-12") || "mb-12" + const headerClasses = twMerge( + headerTagChoice[1]?.replace(".", " ").replace("su-font-splash", "type-3 mb-12") || "mb-12", + adjustHeadingType(headerSize, headerTag) + ) const cardVariant = behaviors.su_card_styles?.sum_card_variant const hasBgColor = behaviors.su_card_styles?.sum_card_bg_color_variant const cardBgColor = cardVariant === "pill" ? behaviors.su_card_styles?.sum_card_pill_bg_color_variant : undefined diff --git a/src/lib/drupal/drupal-jsonapi.d.tsx b/src/lib/drupal/drupal-jsonapi.d.tsx index 256a7e8d..5ac0a58e 100644 --- a/src/lib/drupal/drupal-jsonapi.d.tsx +++ b/src/lib/drupal/drupal-jsonapi.d.tsx @@ -19,6 +19,7 @@ export type CardParagraphBehaviors = { heading?: "h2" | "h3" | "h4" | "div.su-splash-font" hide_heading?: boolean link_style?: "action" | "button" + sum_card_heading_size?: "default" | "larger" | "smaller" sum_card_bg_color_variant?: boolean sum_card_variant?: "pill" sum_card_pill_bg_color_variant?: From ec9c27e482867aeb158afc788ddaa3d1d422fdf7 Mon Sep 17 00:00:00 2001 From: Rebecca Hong <34019925+rebeccahongsf@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:45:18 -0700 Subject: [PATCH 02/15] remove unnecessary default option Co-authored-by: pookmish --- src/lib/drupal/drupal-jsonapi.d.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/drupal/drupal-jsonapi.d.tsx b/src/lib/drupal/drupal-jsonapi.d.tsx index 5ac0a58e..5de52e5e 100644 --- a/src/lib/drupal/drupal-jsonapi.d.tsx +++ b/src/lib/drupal/drupal-jsonapi.d.tsx @@ -19,7 +19,7 @@ export type CardParagraphBehaviors = { heading?: "h2" | "h3" | "h4" | "div.su-splash-font" hide_heading?: boolean link_style?: "action" | "button" - sum_card_heading_size?: "default" | "larger" | "smaller" + sum_card_heading_size?: "larger" | "smaller" sum_card_bg_color_variant?: boolean sum_card_variant?: "pill" sum_card_pill_bg_color_variant?: From 2c1555c61e7fcf6376e46f1829871b0abf5acd20 Mon Sep 17 00:00:00 2001 From: Rebecca Hong <34019925+rebeccahongsf@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:03:59 -0700 Subject: [PATCH 03/15] remove default, add headings Co-authored-by: pookmish --- src/components/paragraphs/stanford-card/card-paragraph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/paragraphs/stanford-card/card-paragraph.tsx b/src/components/paragraphs/stanford-card/card-paragraph.tsx index 9618b633..12bf4481 100644 --- a/src/components/paragraphs/stanford-card/card-paragraph.tsx +++ b/src/components/paragraphs/stanford-card/card-paragraph.tsx @@ -14,7 +14,7 @@ type Props = HtmlHTMLAttributes & { paragraph: ParagraphStanfordCard } -const adjustHeadingType = (size: "larger" | "smaller" | "default" | undefined, heading: string): string => { +const adjustHeadingType = (size?: "larger" | "smaller", heading: "h2" | "h3" | "h4" | "div"): string => { const headingTypes: {[key: string]: number} = { h2: 4, h3: 3, From a7c62d3716d796021ac074a1bd83af001ff8ecd3 Mon Sep 17 00:00:00 2001 From: Rebecca Hong <34019925+rebeccahongsf@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:04:16 -0700 Subject: [PATCH 04/15] correct type Co-authored-by: pookmish --- src/components/paragraphs/stanford-card/card-paragraph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/paragraphs/stanford-card/card-paragraph.tsx b/src/components/paragraphs/stanford-card/card-paragraph.tsx index 12bf4481..5587137c 100644 --- a/src/components/paragraphs/stanford-card/card-paragraph.tsx +++ b/src/components/paragraphs/stanford-card/card-paragraph.tsx @@ -15,7 +15,7 @@ type Props = HtmlHTMLAttributes & { } const adjustHeadingType = (size?: "larger" | "smaller", heading: "h2" | "h3" | "h4" | "div"): string => { - const headingTypes: {[key: string]: number} = { + const headingTypes: Record = { h2: 4, h3: 3, h4: 2, From e8661638ef2746320ddf4a4a87c7de3e74c5bc63 Mon Sep 17 00:00:00 2001 From: Rebecca Hong <34019925+rebeccahongsf@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:04:39 -0700 Subject: [PATCH 05/15] remove unnecessary default check Co-authored-by: pookmish --- src/components/paragraphs/stanford-card/card-paragraph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/paragraphs/stanford-card/card-paragraph.tsx b/src/components/paragraphs/stanford-card/card-paragraph.tsx index 5587137c..b83112dc 100644 --- a/src/components/paragraphs/stanford-card/card-paragraph.tsx +++ b/src/components/paragraphs/stanford-card/card-paragraph.tsx @@ -20,7 +20,7 @@ const adjustHeadingType = (size?: "larger" | "smaller", heading: "h2" | "h3" | " h3: 3, h4: 2, } - if (!headingTypes[heading] || !size || size === "default") return "" + if (!headingTypes[heading] || !size) return "" let type = headingTypes[heading] if (size === "larger") { type += 1 From 81ae83093d5d9ecb7193fb434a8f467bd579c4cd Mon Sep 17 00:00:00 2001 From: Rebecca Hong <34019925+rebeccahongsf@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:05:35 -0700 Subject: [PATCH 06/15] simplify conditional Co-authored-by: pookmish --- src/components/paragraphs/stanford-card/card-paragraph.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/paragraphs/stanford-card/card-paragraph.tsx b/src/components/paragraphs/stanford-card/card-paragraph.tsx index b83112dc..2e896907 100644 --- a/src/components/paragraphs/stanford-card/card-paragraph.tsx +++ b/src/components/paragraphs/stanford-card/card-paragraph.tsx @@ -21,12 +21,7 @@ const adjustHeadingType = (size?: "larger" | "smaller", heading: "h2" | "h3" | " h4: 2, } if (!headingTypes[heading] || !size) return "" - let type = headingTypes[heading] - if (size === "larger") { - type += 1 - } else if (size === "smaller") { - type -= 1 - } + const type = size === "larger" ? headingTypes[heading] + 1 : headingTypes[heading] - 1 return `type-${type}` } From 4411fb8ece86b17708cae5593991d3a062b96aff Mon Sep 17 00:00:00 2001 From: Rebecca Hong <34019925+rebeccahongsf@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:10:08 -0700 Subject: [PATCH 07/15] SUM-253 | customTwMerge (#67) --- src/components/elements/headers.tsx | 2 +- src/lib/utils/twMergeConfig.tsx | 18 ++++++++++ tailwind.config.js | 51 ++++++++++++++--------------- tsconfig.json | 8 ++++- 4 files changed, 51 insertions(+), 28 deletions(-) create mode 100644 src/lib/utils/twMergeConfig.tsx diff --git a/src/components/elements/headers.tsx b/src/components/elements/headers.tsx index f834b0ed..3c932240 100644 --- a/src/components/elements/headers.tsx +++ b/src/components/elements/headers.tsx @@ -1,5 +1,5 @@ +import twMerge from "@lib/utils/twMergeConfig" import {HtmlHTMLAttributes} from "react" -import {twMerge} from "tailwind-merge" type Props = HtmlHTMLAttributes diff --git a/src/lib/utils/twMergeConfig.tsx b/src/lib/utils/twMergeConfig.tsx new file mode 100644 index 00000000..47155de9 --- /dev/null +++ b/src/lib/utils/twMergeConfig.tsx @@ -0,0 +1,18 @@ +import {extendTailwindMerge} from "tailwind-merge" + +// Creates an array containing type-# classes from 0 to 1 +const typeClasses = Array.from({length: 10}, (_, i) => `type-${i}`) +// Creates an array containing text-# classes from 11 to 30 +const textClasses = Array.from({length: 20}, (_, i) => `text-${i + 11}`) + +const typographyClasses = [...textClasses, ...typeClasses] + +const twMerge = extendTailwindMerge({ + extend: { + classGroups: { + "font-size": typographyClasses, + }, + }, +}) + +export default twMerge diff --git a/tailwind.config.js b/tailwind.config.js index 50da222e..bbd3c696 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,27 +1,26 @@ /** @type {import('tailwindcss').Config} */ -const decanter = require('decanter'); +const decanter = require("decanter") -const path = require('path'); -const dir = path.resolve(__dirname, 'src/styles'); +const path = require("path") +const dir = path.resolve(__dirname, "src/styles") -let twoColumn = {}, threeColumn = {}, i; +let twoColumn = {}, + threeColumn = {}, + i for (i = 1; i <= 4; i++) { - twoColumn[`1-${i}`] = `minmax(0, 1fr) minmax(0, ${i}fr)`; - twoColumn[`${i}-1`] = `minmax(0, ${i}fr) minmax(0, 1fr)`; + twoColumn[`1-${i}`] = `minmax(0, 1fr) minmax(0, ${i}fr)` + twoColumn[`${i}-1`] = `minmax(0, ${i}fr) minmax(0, 1fr)` } for (i = 1; i <= 4; i++) { - threeColumn[`${i}-1-1`] = `minmax(0, ${i}fr) minmax(0, 1fr) minmax(0, 1fr)`; - threeColumn[`1-${i}-1`] = `minmax(0, 1fr) minmax(0, ${i}fr) minmax(0, 1fr)`; - threeColumn[`1-1-${i}`] = `minmax(0, 1fr) minmax(0, 1fr) minmax(0, ${i}fr)`; + threeColumn[`${i}-1-1`] = `minmax(0, ${i}fr) minmax(0, 1fr) minmax(0, 1fr)` + threeColumn[`1-${i}-1`] = `minmax(0, 1fr) minmax(0, ${i}fr) minmax(0, 1fr)` + threeColumn[`1-1-${i}`] = `minmax(0, 1fr) minmax(0, 1fr) minmax(0, ${i}fr)` } module.exports = { - content: [ - './src/**/*.{js,ts,jsx,tsx,mdx}', - './app/**/*.{js,ts,jsx,tsx,mdx}', - ], + content: ["./src/**/*.{js,ts,jsx,tsx,mdx}", "./app/**/*.{js,ts,jsx,tsx,mdx}"], theme: { fontFamily: decanter.theme.fontFamily, decanter: decanter.theme.decanter, @@ -33,32 +32,32 @@ module.exports = { }, gridTemplateColumns: {...twoColumn, ...threeColumn}, containers: { - '8xl': '80rem', - '9xl': '90rem', - '10xl': '100rem', - '11xl': '110rem', - '12xl': '120rem', - '13xl': '130rem', - '14xl': '140rem', - '15xl': '150rem', + "8xl": "80rem", + "9xl": "90rem", + "10xl": "100rem", + "11xl": "110rem", + "12xl": "120rem", + "13xl": "130rem", + "14xl": "140rem", + "15xl": "150rem", }, screens: { - '4xl': '2000px', + "4xl": "2000px", }, scale: { - '-100': '-1' + "-100": "-1", }, fontFamily: { - roboto: ['var(--font-roboto)', 'sans-serif'], + roboto: ["var(--font-roboto)", "sans-serif"], }, }, }, plugins: [ ...decanter.plugins, - require('@tailwindcss/container-queries'), + require("@tailwindcss/container-queries"), require(`${dir}/typography/local-footer.tsx`)(), require(`${dir}/typography/global-message.tsx`)(), require(`${dir}/typography/wysiwyg.tsx`)(), require(`${dir}/centered-container.tsx`)(), ], -}; +} diff --git a/tsconfig.json b/tsconfig.json index c80b9261..15ec65b0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,6 +20,12 @@ "@lib/*": ["./src/lib/*"] } }, - "include": ["next-env.d.ts", "src/**/*.tsx", "app/**/*.tsx", ".storybook/stories/**/*.tsx", ".next/types/**/*.ts"], + "include": [ + "next-env.d.ts", + "src/**/*.tsx", + "app/**/*.tsx", + ".storybook/stories/**/*.tsx", + ".next/types/**/*.ts", + ], "exclude": ["node_modules"] } From 5e718502761ab1e2fbb0aae9cee0bf30ef3211b9 Mon Sep 17 00:00:00 2001 From: rebeccahongsf Date: Wed, 18 Sep 2024 13:59:57 -0700 Subject: [PATCH 08/15] fixup lint; adjust to use clsx --- .../paragraphs/stanford-card/card-paragraph.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/paragraphs/stanford-card/card-paragraph.tsx b/src/components/paragraphs/stanford-card/card-paragraph.tsx index 2e896907..74c95915 100644 --- a/src/components/paragraphs/stanford-card/card-paragraph.tsx +++ b/src/components/paragraphs/stanford-card/card-paragraph.tsx @@ -14,7 +14,7 @@ type Props = HtmlHTMLAttributes & { paragraph: ParagraphStanfordCard } -const adjustHeadingType = (size?: "larger" | "smaller", heading: "h2" | "h3" | "h4" | "div"): string => { +const adjustHeadingType = (heading: "h2" | "h3" | "h4" | "div", size?: "larger" | "smaller"): string | number => { const headingTypes: Record = { h2: 4, h3: 3, @@ -23,7 +23,7 @@ const adjustHeadingType = (size?: "larger" | "smaller", heading: "h2" | "h3" | " if (!headingTypes[heading] || !size) return "" const type = size === "larger" ? headingTypes[heading] + 1 : headingTypes[heading] - 1 - return `type-${type}` + return type } const CardParagraph = ({paragraph, ...props}: Props) => { @@ -35,10 +35,17 @@ const CardParagraph = ({paragraph, ...props}: Props) => { const headerTagChoice = (behaviors.su_card_styles?.heading || "h2").split(".", 2) const headerSize = behaviors.su_card_styles?.sum_card_heading_size - const headerTag = headerTagChoice[0] + const headerTag = headerTagChoice[0] as "h2" | "h3" | "h4" | "div" + const headerType = adjustHeadingType(headerTag, headerSize) const headerClasses = twMerge( headerTagChoice[1]?.replace(".", " ").replace("su-font-splash", "type-3 mb-12") || "mb-12", - adjustHeadingType(headerSize, headerTag) + clsx({ + "type-4": headerType === 4, + "type-3": headerType === 3, + "type-2": headerType === 2, + "type-1": headerType === 1, + "type-0": headerType === 0, + }) ) const cardVariant = behaviors.su_card_styles?.sum_card_variant const hasBgColor = behaviors.su_card_styles?.sum_card_bg_color_variant From 32df00701f73886c3c196ab329b796e27a4c0e6c Mon Sep 17 00:00:00 2001 From: Rebecca Hong <34019925+rebeccahongsf@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:51:33 -0700 Subject: [PATCH 09/15] remove empty string return Co-authored-by: pookmish --- src/components/paragraphs/stanford-card/card-paragraph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/paragraphs/stanford-card/card-paragraph.tsx b/src/components/paragraphs/stanford-card/card-paragraph.tsx index af332d7a..ade75fc9 100644 --- a/src/components/paragraphs/stanford-card/card-paragraph.tsx +++ b/src/components/paragraphs/stanford-card/card-paragraph.tsx @@ -20,7 +20,7 @@ const adjustHeadingType = (heading: "h2" | "h3" | "h4" | "div", size?: "larger" h3: 3, h4: 2, } - if (!headingTypes[heading] || !size) return "" + if (!headingTypes[heading] || !size) return const type = size === "larger" ? headingTypes[heading] + 1 : headingTypes[heading] - 1 return type From 75b0f234fbda9a2bc96cd9bac9593dca2fc6ded8 Mon Sep 17 00:00:00 2001 From: Rebecca Hong <34019925+rebeccahongsf@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:52:01 -0700 Subject: [PATCH 10/15] return heading type size Co-authored-by: pookmish --- src/components/paragraphs/stanford-card/card-paragraph.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/paragraphs/stanford-card/card-paragraph.tsx b/src/components/paragraphs/stanford-card/card-paragraph.tsx index ade75fc9..4790eb5f 100644 --- a/src/components/paragraphs/stanford-card/card-paragraph.tsx +++ b/src/components/paragraphs/stanford-card/card-paragraph.tsx @@ -21,9 +21,7 @@ const adjustHeadingType = (heading: "h2" | "h3" | "h4" | "div", size?: "larger" h4: 2, } if (!headingTypes[heading] || !size) return - const type = size === "larger" ? headingTypes[heading] + 1 : headingTypes[heading] - 1 - - return type + return size === "larger" ? headingTypes[heading] + 1 : headingTypes[heading] - 1 } const CardParagraph = ({paragraph, ...props}: Props) => { From 91f4011a7837dfdd7dc96b98863d20410c28466f Mon Sep 17 00:00:00 2001 From: Rebecca Hong <34019925+rebeccahongsf@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:52:19 -0700 Subject: [PATCH 11/15] replace string with undefined Co-authored-by: pookmish --- src/components/paragraphs/stanford-card/card-paragraph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/paragraphs/stanford-card/card-paragraph.tsx b/src/components/paragraphs/stanford-card/card-paragraph.tsx index 4790eb5f..ebbe582e 100644 --- a/src/components/paragraphs/stanford-card/card-paragraph.tsx +++ b/src/components/paragraphs/stanford-card/card-paragraph.tsx @@ -14,7 +14,7 @@ type Props = HtmlHTMLAttributes & { paragraph: ParagraphStanfordCard } -const adjustHeadingType = (heading: "h2" | "h3" | "h4" | "div", size?: "larger" | "smaller"): string | number => { +const adjustHeadingType = (heading: "h2" | "h3" | "h4" | "div", size?: "larger" | "smaller"): number | undefined => { const headingTypes: Record = { h2: 4, h3: 3, From 0e975db5c511e67bed70be68cf53e100b34fd1f5 Mon Sep 17 00:00:00 2001 From: rebeccahongsf Date: Wed, 18 Sep 2024 14:52:54 -0700 Subject: [PATCH 12/15] SUM-269 | adjust links for dark pill color backgrounds --- src/components/patterns/pill-card.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/patterns/pill-card.tsx b/src/components/patterns/pill-card.tsx index fe11081f..f88d144b 100644 --- a/src/components/patterns/pill-card.tsx +++ b/src/components/patterns/pill-card.tsx @@ -69,6 +69,8 @@ const PillCard = ({imageUrl, imageAlt, videoUrl, isArticle, children, bgColor, . "rs-px-3 flex flex-col pb-[125px] pt-20 @7xl:rs-px-4 @2xl:pb-[175px] @3xl:pb-[225px] @4xl:pb-[300px]", clsx({ "pt-[125px] @3xl:pt-[175px] @4xl:pt-[225px] @5xl:pt-[250px] @7xl:pt-[300px]": !imageUrl, + "[&_p>a]:text-black-true [&_p>a]:no-underline [&_p>a]:hocus:text-black-true [&_p>a]:hocus:underline": + typeof bgColor == "string" && !bgColor?.includes("semitransparent"), }) )} > From fbf101d67d16d440ff465a6b0e10f312cc5e2c64 Mon Sep 17 00:00:00 2001 From: rebeccahongsf Date: Wed, 18 Sep 2024 15:11:25 -0700 Subject: [PATCH 13/15] adjust conditional --- src/components/patterns/pill-card.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/patterns/pill-card.tsx b/src/components/patterns/pill-card.tsx index f88d144b..9d6cb1f3 100644 --- a/src/components/patterns/pill-card.tsx +++ b/src/components/patterns/pill-card.tsx @@ -66,11 +66,11 @@ const PillCard = ({imageUrl, imageAlt, videoUrl, isArticle, children, bgColor, .
a]:text-black-true hocus:[&_p>a]:text-[#00365C]", clsx({ "pt-[125px] @3xl:pt-[175px] @4xl:pt-[225px] @5xl:pt-[250px] @7xl:pt-[300px]": !imageUrl, - "[&_p>a]:text-black-true [&_p>a]:no-underline [&_p>a]:hocus:text-black-true [&_p>a]:hocus:underline": - typeof bgColor == "string" && !bgColor?.includes("semitransparent"), + "[&_p>a]:text-digital-blue hocus:[&_p>a]:text-black": + typeof bgColor == "string" && bgColor?.includes("semitransparent"), }) )} > From 0d468b76180a07281e3d9ef0b194dfa51643f045 Mon Sep 17 00:00:00 2001 From: rebeccahongsf Date: Thu, 19 Sep 2024 12:56:53 -0700 Subject: [PATCH 14/15] remove unecessary conditional --- src/components/patterns/pill-card.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/patterns/pill-card.tsx b/src/components/patterns/pill-card.tsx index 9d6cb1f3..a9637d5d 100644 --- a/src/components/patterns/pill-card.tsx +++ b/src/components/patterns/pill-card.tsx @@ -69,8 +69,6 @@ const PillCard = ({imageUrl, imageAlt, videoUrl, isArticle, children, bgColor, . "rs-px-3 flex flex-col pb-[125px] pt-20 @7xl:rs-px-4 @2xl:pb-[175px] @3xl:pb-[225px] @4xl:pb-[300px] [&_p>a]:text-black-true hocus:[&_p>a]:text-[#00365C]", clsx({ "pt-[125px] @3xl:pt-[175px] @4xl:pt-[225px] @5xl:pt-[250px] @7xl:pt-[300px]": !imageUrl, - "[&_p>a]:text-digital-blue hocus:[&_p>a]:text-black": - typeof bgColor == "string" && bgColor?.includes("semitransparent"), }) )} > From 08325f972289a1844f216ed1282fa7169deb6a30 Mon Sep 17 00:00:00 2001 From: rebeccahongsf Date: Thu, 19 Sep 2024 13:49:36 -0700 Subject: [PATCH 15/15] change to an accessible blue --- src/components/patterns/pill-card.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/patterns/pill-card.tsx b/src/components/patterns/pill-card.tsx index a9637d5d..f64e1bbd 100644 --- a/src/components/patterns/pill-card.tsx +++ b/src/components/patterns/pill-card.tsx @@ -66,7 +66,7 @@ const PillCard = ({imageUrl, imageAlt, videoUrl, isArticle, children, bgColor, .
a]:text-black-true hocus:[&_p>a]:text-[#00365C]", + "rs-px-3 flex flex-col pb-[125px] pt-20 @7xl:rs-px-4 @2xl:pb-[175px] @3xl:pb-[225px] @4xl:pb-[300px] [&_p>a]:text-black-true hocus:[&_p>a]:text-[#001829]", clsx({ "pt-[125px] @3xl:pt-[175px] @4xl:pt-[225px] @5xl:pt-[250px] @7xl:pt-[300px]": !imageUrl, })