From bcea452f33c8065f617dbfa9a81cd618a7edcaf2 Mon Sep 17 00:00:00 2001 From: Olivia Wong Date: Fri, 5 Jul 2024 15:49:52 -0400 Subject: [PATCH] Adds !important to certain styles --- CHANGELOG.md | 2 ++ src/theme/headerLowerNav.ts | 2 +- src/theme/headerSearchButton.ts | 2 +- src/theme/headerUpperNav.ts | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 790143d..8ff9fa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ ### Updates - Removes fallback font options so footer inherits from the DS. +- Adds `!important` designation to header font sizes so consuming app styles + don't override it. ## 5/16/24 diff --git a/src/theme/headerLowerNav.ts b/src/theme/headerLowerNav.ts index 14752dc..19da7e3 100644 --- a/src/theme/headerLowerNav.ts +++ b/src/theme/headerLowerNav.ts @@ -27,7 +27,7 @@ const HeaderLowerNav = { "li > a": { color: "ui.black", fontSize: { - base: "desktop.subtitle.subtitle2", + base: "var(--nypl-fontSizes-desktop-subtitle-subtitle2) !important", lh: "desktop.subtitle.subtTitle1", }, fontWeight: "medium", diff --git a/src/theme/headerSearchButton.ts b/src/theme/headerSearchButton.ts index c38d8e5..b2c8998 100644 --- a/src/theme/headerSearchButton.ts +++ b/src/theme/headerSearchButton.ts @@ -8,7 +8,7 @@ const HeaderSearchButton = { color: isOpen ? "ui.white" : "ui.link.primary", display: "flex", fontFamily: "body", - fontSize: "inherit", + fontSize: "inherit !important", fontWeight: "medium", justifyContent: "center", minHeight: { mh: "30px" }, diff --git a/src/theme/headerUpperNav.ts b/src/theme/headerUpperNav.ts index 3dc26da..989205e 100644 --- a/src/theme/headerUpperNav.ts +++ b/src/theme/headerUpperNav.ts @@ -1,4 +1,4 @@ -import { headerFocus, headerRed } from "./header"; +import { headerFocus } from "./header"; const HeaderUpperNav = { parts: ["donateLink"], @@ -11,7 +11,7 @@ const HeaderUpperNav = { whiteSpace: "nowrap", }, li: { - fontSize: "desktop.body.body2", + fontSize: "var(--nypl-fontSizes-desktop-body-body2) !important", fontWeight: "medium", marginRight: "s", _last: {