From c225967892c4823da42d4542c194755fc67f910d Mon Sep 17 00:00:00 2001 From: Do Siki Date: Tue, 29 Sep 2026 19:42:25 +0200 Subject: [PATCH] fix(ui): Tailwind dark variant follows the site theme; dark hosting plans page The dark: variant now matches data-theme="dark" (toggle) or the system preference when no theme is stored, like the design tokens. Other subpage views (Services, About, Contact, Legal) still need dark: classes. Co-Authored-By: Claude Opus 5.5 --- proto/src/app/(frontend)/globals.css | 14 +++++++ .../src/components/views/HostingPlansView.tsx | 38 +++++++++---------- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/proto/src/app/(frontend)/globals.css b/proto/src/app/(frontend)/globals.css index 9d80d81..6226d39 100755 --- a/proto/src/app/(frontend)/globals.css +++ b/proto/src/app/(frontend)/globals.css @@ -1,5 +1,19 @@ @import "tailwindcss"; +/* Tailwind `dark:` follows the site theme: the explicit toggle + (data-theme="dark") or, with no choice stored, the system preference — + the same rule as the design tokens below. */ +@custom-variant dark { + &:where([data-theme="dark"], [data-theme="dark"] *) { + @slot; + } + @media (prefers-color-scheme: dark) { + &:where(:root:not([data-theme]), :root:not([data-theme]) *) { + @slot; + } + } +} + /* ======================================== mozdIT Bt. Design System ======================================== */ diff --git a/proto/src/components/views/HostingPlansView.tsx b/proto/src/components/views/HostingPlansView.tsx index fc67d2c..1ba809c 100644 --- a/proto/src/components/views/HostingPlansView.tsx +++ b/proto/src/components/views/HostingPlansView.tsx @@ -44,10 +44,10 @@ export default function HostingPlansView({ content, plans, locale }: HostingPlan return (
-
+
-

{content.hero.title}

-

{content.hero.subtitle}

+

{content.hero.title}

+

{content.hero.subtitle}

@@ -59,30 +59,30 @@ export default function HostingPlansView({ content, plans, locale }: HostingPlan
  • {plan.highlighted && ( {labels.recommended} )} -

    {plan.name}

    -

    {plan.audience}

    -

    {plan.shortDescription}

    +

    {plan.name}

    +

    {plan.audience}

    +

    {plan.shortDescription}

    - {formatHuf(plan.netAmount, locale)}{' '} - {labels.plusVat} {period} + {formatHuf(plan.netAmount, locale)}{' '} + {labels.plusVat} {period}

    -

    +

    {labels.grossPrice} {formatHuf(grossAmount(plan.netAmount, vatRate), locale)} {period}

    -
    +
    {comparisonRows(plan, labels).map(([term, value]) => (
    -
    {term}
    -
    {value}
    +
    {term}
    +
    {value}
    ))}
    @@ -90,7 +90,7 @@ export default function HostingPlansView({ content, plans, locale }: HostingPlan {plan.features.length > 0 && (
      {plan.features.map((feature) => ( -
    • +
    • {feature}
    • @@ -100,7 +100,7 @@ export default function HostingPlansView({ content, plans, locale }: HostingPlan {plan.ctaText} @@ -108,13 +108,13 @@ export default function HostingPlansView({ content, plans, locale }: HostingPlan ) })}
    -

    {labels.priceNote}

    +

    {labels.priceNote}

  • -
    +
    -

    {content.largerNeeds.title}

    -

    {content.largerNeeds.text}

    +

    {content.largerNeeds.title}

    +

    {content.largerNeeds.text}