Skip to content

Shadcn UI Theme Variables Implementation from Design System #1217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 12, 2025

Conversation

AH-Avalanche
Copy link
Collaborator

@AH-Avalanche AH-Avalanche commented Apr 16, 2025

Overview

This PR implements the design system's color palette and theme variables into the Shadcn UI configuration, ensuring consistent styling across the documentation site.

Key Changes

1. Theme Variables Implementation

  • src/css/custom.css:
    • Added design system color variables for both light and dark themes
    • Implemented proper HSL color values for all Shadcn UI components
    • Added smooth transitions between theme states
    • Configured proper color contrast ratios

2. Color Palette Integration

/* Light Theme */
:root {
  --background: 210 20% 98.04%;
  --foreground: 220.91 39.29% 10.98%;
  --primary: 261.56 53.33% 47.06%;
  --primary-foreground: 0 0% 100%;
  /* ... other color variables ... */
}

/* Dark Theme */
[data-theme='dark'] {
  --background: 0 0% 1.96%;
  --foreground: 0 0% 90.2%;
  --primary: 258.05 71.93% 66.47%;
  --primary-foreground: 0 0% 90.2%;
  /* ... other color variables ... */
}

3. Check only these Component Updates

  • src/components/ui/button.jsx:

    • Updated to use new theme variables
    • Ensured proper color application across variants
    • Added smooth transitions for state changes
  • src/components/ui/theme-switcher.jsx:

    • Updated to handle new theme variables
    • Improved theme transition handling
    • Added proper icon color transitions

Testing Instructions

  1. Theme Variables:

    • Verify all color variables match design system
    • Check color contrast ratios
    • Test transitions between themes
  2. Component Styling:

    • Verify components use correct theme variables
    • Check hover and active states
    • Test in both light and dark modes
  3. Accessibility:

    • Verify proper color contrast
    • Test focus states
    • Check text readability

test page:
/tailwind-test

Review Checklist

  • Verify all color variables match design system
  • Test color transitions between themes
  • Check component styling in both themes
  • Verify accessibility standards
  • Test responsive behavior
  • Ensure consistent color application

Overview
This PR implements the design system's color palette and theme variables into the Shadcn UI configuration, ensuring consistent styling across the documentation site.
Key Changes
1. Theme Variables Implementation
src/css/custom.css:
Added design system color variables for both light and dark themes
Implemented proper HSL color values for all Shadcn UI components
Added smooth transitions between theme states
Configured proper color contrast ratios
2. Color Palette Integration
Apply to custom.css
}
3. Component Updates
src/components/ui/button.jsx:
Updated to use new theme variables
Ensured proper color application across variants
Added smooth transitions for state changes
src/components/ui/theme-switcher.jsx:
Updated to handle new theme variables
Improved theme transition handling
Added proper icon color transitions
Testing Instructions
Theme Variables:
Verify all color variables match design system
Check color contrast ratios
Test transitions between themes
Component Styling:
Verify components use correct theme variables
Check hover and active states
Test in both light and dark modes
Accessibility:
Verify proper color contrast
Test focus states
Check text readability
Review Checklist
[ ] Verify all color variables match design system
[ ] Test color transitions between themes
[ ] Check component styling in both themes
[ ] Verify accessibility standards
[ ] Test responsive behavior
[ ] Ensure consistent color application
Copy link

netlify bot commented Apr 16, 2025

Deploy Preview for snowplow-docs ready!

Name Link
🔨 Latest commit dca94ca
🔍 Latest deploy log https://app.netlify.com/sites/snowplow-docs/deploys/6821eb30dbda1b0008aea600
😎 Deploy Preview https://deploy-preview-1217--snowplow-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

github-actions bot and others added 17 commits May 12, 2025 08:09
* Enrich 5.3.0
* Document JS element tracking plugin

* Move element tracking examples higher

* Vale lint
* Rename ID service to Cookie Extension service

* Rename "ID Service" to "Cookie Extension Service" in GTM (#1226)

---------

Co-authored-by: Greg Leonard <45019882+greg-el@users.noreply.github.com>
* Remove the old feedback widget

* Add product fruits package

* Add netlify function

* Add Product Fruits to Root

* Update yarn.lock
Add missing .md filenames
* Document PHP tracker Server Anonymization support

Added in 0.9.1

* Bump PHP tracker version 0.8.0 > 0.9.2

* Vale lint fixes

* Remove title casing for 'debug mode'

Co-authored-by: Miranda Wilson <miranda@snowplow.io>

---------

Co-authored-by: Miranda Wilson <miranda@snowplow.io>
Co-authored-by: agnessnowplow <95634439+agnessnowplow@users.noreply.github.com>
There is no `job title` in the example schema. I propose changing it to an existing field.
…ed Font Fallbacks (#1220)

Overview
This PR consolidates all font family declarations into a single source of truth (custom.css), optimizes the heading hierarchy for better content scanning, and implements improved system font fallbacks for better performance and reliability, using Inter as the standard font per the design system.
Key Changes
1. Font Consolidation
src/css/custom.css:
Centralized all font face declarations
Removed duplicate font family declarations
Established single source of truth for typography
Apply to custom.css
}
2. Improved Font Fallbacks
Enhanced System Font Stack:
Apply to custom.css
}
Added modern system font stack
Improved cross-platform consistency
Enhanced performance during font loading
3. Heading Hierarchy Optimization
Improved Visual Hierarchy:
Apply to custom.css
}
Increased size difference between h1, h2, and h3
Improved line heights for better readability
Enhanced visual scanning of content structure
4. Font Family Cleanup
Removed font family declarations from:
Individual component files
Inline styles
Component-specific CSS
Theme configuration files
Testing Instructions
Font Consistency:
Verify all text uses Inter font
Check for any remaining inline font declarations
Test font loading across all pages
Font Fallbacks:
Test with Inter font disabled
Verify system font fallbacks on different platforms
Check font rendering across browsers
Heading Hierarchy:
Verify clear visual distinction between heading levels
Check content scanning experience
Test responsive behavior of heading sizes
Performance:
Verify font loading optimization
Check for any duplicate font declarations
Test page load performance
Review Checklist
[ ] Verify all font declarations are removed from components
[ ] Test font fallbacks across different platforms
[ ] Check heading size hierarchy across all pages
[ ] Verify content scanning experience
[ ] Test responsive behavior
[ ] Check accessibility standards
[ ] Verify page load performance
Overview
This PR implements the design system's color palette and theme variables into the Shadcn UI configuration, ensuring consistent styling across the documentation site.
Key Changes
1. Theme Variables Implementation
src/css/custom.css:
Added design system color variables for both light and dark themes
Implemented proper HSL color values for all Shadcn UI components
Added smooth transitions between theme states
Configured proper color contrast ratios
2. Color Palette Integration
Apply to custom.css
}
3. Component Updates
src/components/ui/button.jsx:
Updated to use new theme variables
Ensured proper color application across variants
Added smooth transitions for state changes
src/components/ui/theme-switcher.jsx:
Updated to handle new theme variables
Improved theme transition handling
Added proper icon color transitions
Testing Instructions
Theme Variables:
Verify all color variables match design system
Check color contrast ratios
Test transitions between themes
Component Styling:
Verify components use correct theme variables
Check hover and active states
Test in both light and dark modes
Accessibility:
Verify proper color contrast
Test focus states
Check text readability
Review Checklist
[ ] Verify all color variables match design system
[ ] Test color transitions between themes
[ ] Check component styling in both themes
[ ] Verify accessibility standards
[ ] Test responsive behavior
[ ] Ensure consistent color application
@AH-Avalanche AH-Avalanche merged commit 9ef2650 into main May 12, 2025
5 checks passed
@AH-Avalanche AH-Avalanche deleted the Merge_docu_theme_with_ShadeCN_CSS_Theme branch May 12, 2025 22:37
@AH-Avalanche AH-Avalanche restored the Merge_docu_theme_with_ShadeCN_CSS_Theme branch May 12, 2025 22:45
pif pushed a commit that referenced this pull request Jun 11, 2025
* Shadcn UI Theme Variables Implementation from Design System

Overview
This PR implements the design system's color palette and theme variables into the Shadcn UI configuration, ensuring consistent styling across the documentation site.
Key Changes
1. Theme Variables Implementation
src/css/custom.css:
Added design system color variables for both light and dark themes
Implemented proper HSL color values for all Shadcn UI components
Added smooth transitions between theme states
Configured proper color contrast ratios
2. Color Palette Integration
Apply to custom.css
}
3. Component Updates
src/components/ui/button.jsx:
Updated to use new theme variables
Ensured proper color application across variants
Added smooth transitions for state changes
src/components/ui/theme-switcher.jsx:
Updated to handle new theme variables
Improved theme transition handling
Added proper icon color transitions
Testing Instructions
Theme Variables:
Verify all color variables match design system
Check color contrast ratios
Test transitions between themes
Component Styling:
Verify components use correct theme variables
Check hover and active states
Test in both light and dark modes
Accessibility:
Verify proper color contrast
Test focus states
Check text readability
Review Checklist
[ ] Verify all color variables match design system
[ ] Test color transitions between themes
[ ] Check component styling in both themes
[ ] Verify accessibility standards
[ ] Test responsive behavior
[ ] Ensure consistent color application

* Release Attribution version 0.5.0 (#1215)

* Enrich 5.3.0 (#1173)

* Enrich 5.3.0

* [create-pull-request] automated change (#1221)

* Upgrade iglu server to 0.14.1 (#1223)

* Document JS element tracking plugin (#1224)

* Document JS element tracking plugin

* Move element tracking examples higher

* Vale lint

* Add Bigquery support to the Data Quality Dashboard (#1228)

* Rename ID service to Cookie Extension service (#1219)

* Rename ID service to Cookie Extension service

* Rename "ID Service" to "Cookie Extension Service" in GTM (#1226)

---------

Co-authored-by: Greg Leonard <45019882+greg-el@users.noreply.github.com>

* Add lake loader 0.6.3 & Mini 0.23.0 (#1231)

* Add Product Fruits (#1181)

* Remove the old feedback widget

* Add product fruits package

* Add netlify function

* Add Product Fruits to Root

* Update yarn.lock

* Fix local link references (#1227)

Add missing .md filenames

* Document Server Anonymization in PHP tracker (#1216)

* Document PHP tracker Server Anonymization support

Added in 0.9.1

* Bump PHP tracker version 0.8.0 > 0.9.2

* Vale lint fixes

* Remove title casing for 'debug mode'

Co-authored-by: Miranda Wilson <miranda@snowplow.io>

---------

Co-authored-by: Miranda Wilson <miranda@snowplow.io>

* US spelling (colour > color) (#1234)

* Clarification for Event Specifications plugin (#1235)

* [create-pull-request] automated change (#1236)

Co-authored-by: agnessnowplow <95634439+agnessnowplow@users.noreply.github.com>

* Update index.md (#1230)

There is no `job title` in the example schema. I propose changing it to an existing field.

* Font System Consolidation, Heading Hierarchy Optimization, and Improved Font Fallbacks (#1220)

Overview
This PR consolidates all font family declarations into a single source of truth (custom.css), optimizes the heading hierarchy for better content scanning, and implements improved system font fallbacks for better performance and reliability, using Inter as the standard font per the design system.
Key Changes
1. Font Consolidation
src/css/custom.css:
Centralized all font face declarations
Removed duplicate font family declarations
Established single source of truth for typography
Apply to custom.css
}
2. Improved Font Fallbacks
Enhanced System Font Stack:
Apply to custom.css
}
Added modern system font stack
Improved cross-platform consistency
Enhanced performance during font loading
3. Heading Hierarchy Optimization
Improved Visual Hierarchy:
Apply to custom.css
}
Increased size difference between h1, h2, and h3
Improved line heights for better readability
Enhanced visual scanning of content structure
4. Font Family Cleanup
Removed font family declarations from:
Individual component files
Inline styles
Component-specific CSS
Theme configuration files
Testing Instructions
Font Consistency:
Verify all text uses Inter font
Check for any remaining inline font declarations
Test font loading across all pages
Font Fallbacks:
Test with Inter font disabled
Verify system font fallbacks on different platforms
Check font rendering across browsers
Heading Hierarchy:
Verify clear visual distinction between heading levels
Check content scanning experience
Test responsive behavior of heading sizes
Performance:
Verify font loading optimization
Check for any duplicate font declarations
Test page load performance
Review Checklist
[ ] Verify all font declarations are removed from components
[ ] Test font fallbacks across different platforms
[ ] Check heading size hierarchy across all pages
[ ] Verify content scanning experience
[ ] Test responsive behavior
[ ] Check accessibility standards
[ ] Verify page load performance

* Shadcn UI Theme Variables Implementation from Design System

Overview
This PR implements the design system's color palette and theme variables into the Shadcn UI configuration, ensuring consistent styling across the documentation site.
Key Changes
1. Theme Variables Implementation
src/css/custom.css:
Added design system color variables for both light and dark themes
Implemented proper HSL color values for all Shadcn UI components
Added smooth transitions between theme states
Configured proper color contrast ratios
2. Color Palette Integration
Apply to custom.css
}
3. Component Updates
src/components/ui/button.jsx:
Updated to use new theme variables
Ensured proper color application across variants
Added smooth transitions for state changes
src/components/ui/theme-switcher.jsx:
Updated to handle new theme variables
Improved theme transition handling
Added proper icon color transitions
Testing Instructions
Theme Variables:
Verify all color variables match design system
Check color contrast ratios
Test transitions between themes
Component Styling:
Verify components use correct theme variables
Check hover and active states
Test in both light and dark modes
Accessibility:
Verify proper color contrast
Test focus states
Check text readability
Review Checklist
[ ] Verify all color variables match design system
[ ] Test color transitions between themes
[ ] Check component styling in both themes
[ ] Verify accessibility standards
[ ] Test responsive behavior
[ ] Ensure consistent color application

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Enes Aldemir <88285759+spenes@users.noreply.github.com>
Co-authored-by: Oguzhan Unlu <oguzhan@snowplowanalytics.com>
Co-authored-by: Jethro Nederhof <jethro.nederhof@snowplowanalytics.com>
Co-authored-by: John Reid <john.reid@snowplowanalytics.com>
Co-authored-by: Peter Perlepes <p.perlepes@gmail.com>
Co-authored-by: Greg Leonard <45019882+greg-el@users.noreply.github.com>
Co-authored-by: Miranda Wilson <miranda@snowplow.io>
Co-authored-by: agnessnowplow <95634439+agnessnowplow@users.noreply.github.com>
Co-authored-by: Remi Adeleye <remi.adeleye@tastytrade.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants