many changes for modules widgets and colors and styling
This commit is contained in:
@@ -1,63 +1,70 @@
|
||||
# Design Tokens & Styles
|
||||
|
||||
This directory contains the centralized design token system and legacy compatibility styles.
|
||||
This directory contains the centralized design token system for the IGNY8 application.
|
||||
|
||||
## Files
|
||||
|
||||
- `tokens.css` - **Single source of truth** for all design tokens (colors, gradients, shadows)
|
||||
- `igny8-colors.css` - Legacy compatibility file (deprecated - use tokens.css instead)
|
||||
- `global.css` - Global base styles
|
||||
- `cms/` - CMS-specific styles
|
||||
|
||||
## Design Tokens (`tokens.css`)
|
||||
|
||||
All design tokens use plain naming (no "igny8" prefix):
|
||||
|
||||
### Color Tokens
|
||||
- `--color-primary` - Primary brand blue (#0693e3)
|
||||
- `--color-primary-dark` - Primary dark variant (#0472b8)
|
||||
- `--color-success` - Success green (#0bbf87)
|
||||
- `--color-warning` - Warning amber (#ff7a00)
|
||||
- `--color-danger` - Danger red (#ef4444)
|
||||
- `--color-purple` - Purple accent (#5d4ae3)
|
||||
- `--color-primary` - Primary brand blue (#2C7AA1)
|
||||
- `--color-primary-dark` - Primary dark variant (#236082)
|
||||
- `--color-success` - Success green (#2CA18E)
|
||||
- `--color-warning` - Warning amber (#D9A12C)
|
||||
- `--color-danger` - Danger red (#A12C40)
|
||||
- `--color-purple` - Purple accent (#2C40A1)
|
||||
|
||||
### Usage
|
||||
|
||||
**✅ DO:**
|
||||
```tsx
|
||||
// Use Tailwind utilities
|
||||
// Use Tailwind utilities with design system colors
|
||||
<div className="bg-brand-500 text-white">Content</div>
|
||||
|
||||
// Use CSS variables for custom values
|
||||
<div className="bg-[var(--color-primary)]">Content</div>
|
||||
// Use CSS variables for inline styles
|
||||
<div style={{ color: 'var(--color-primary)' }}>Content</div>
|
||||
|
||||
// Use React components
|
||||
// Use design system React components
|
||||
<Button tone="brand" variant="gradient">Click me</Button>
|
||||
|
||||
// Use colors.config.ts for programmatic access
|
||||
import { getModuleCSSColor } from '@/config/colors.config';
|
||||
const color = getModuleCSSColor('keywords'); // Returns computed CSS value
|
||||
```
|
||||
|
||||
**❌ DON'T:**
|
||||
```tsx
|
||||
// Don't use deprecated utility classes
|
||||
<div className="igny8-bg-blue">Content</div>
|
||||
// Don't hardcode hex colors
|
||||
<div className="bg-[#3B82F6]">Content</div>
|
||||
|
||||
// Don't hardcode colors
|
||||
<div className="bg-[#0693e3]">Content</div>
|
||||
// Don't use Tailwind default colors (blue-500, emerald-500, etc.)
|
||||
<div className="text-emerald-500">Content</div>
|
||||
|
||||
// Don't use inline hex colors
|
||||
<div style={{ color: '#F59E0B' }}>Content</div>
|
||||
```
|
||||
|
||||
## Legacy File (`igny8-colors.css`)
|
||||
## Active Utility Classes (in index.css)
|
||||
|
||||
⚠️ **DEPRECATED** - This file is maintained for backward compatibility only.
|
||||
The following utility classes are actively used:
|
||||
- `.igny8-table-*` - Table styling utilities
|
||||
- `.igny8-header-metric-*` - Header metrics bar styling
|
||||
- `.igny8-select-styled` - Dropdown arrow styling
|
||||
|
||||
- Legacy variable aliases (`--igny8-*` → `--color-*`)
|
||||
- Active utility classes (`.igny8-table-*`, `.igny8-header-metric-*`)
|
||||
- Deprecated utility classes (marked - do not use in new code)
|
||||
|
||||
See `MIGRATION_GUIDE.md` for migration instructions.
|
||||
These are defined in `/src/index.css`, not here.
|
||||
|
||||
## Migration
|
||||
|
||||
All new code should use:
|
||||
1. Design tokens from `tokens.css`
|
||||
2. Tailwind utilities (`bg-brand-500`, `text-brand-500`)
|
||||
All code should use:
|
||||
1. Design tokens from `tokens.css` via CSS variables
|
||||
2. Tailwind utilities mapped to design tokens (`bg-brand-500`, `text-success-500`)
|
||||
3. `colors.config.ts` for programmatic color access
|
||||
3. React components (`Button`, `Badge`, `Card`)
|
||||
|
||||
See `../MIGRATION_GUIDE.md` for complete migration guide.
|
||||
|
||||
@@ -1,617 +0,0 @@
|
||||
/* ===================================================================
|
||||
IGNY8 UTILITY CLASSES & LEGACY SUPPORT
|
||||
===================================================================
|
||||
⚠️ DEPRECATED: This file is maintained for backward compatibility.
|
||||
New code should use:
|
||||
- CSS variables: var(--color-primary), var(--color-success), etc.
|
||||
- Tailwind utilities: bg-brand-500, text-brand-500, etc.
|
||||
- React components: Button, Badge, Card from /components/ui/
|
||||
|
||||
🔒 DESIGN SYSTEM LOCKED - See DESIGN_SYSTEM.md for complete style guide
|
||||
|
||||
This file provides:
|
||||
1. Legacy variable aliases (--igny8-* → --color-*)
|
||||
2. Active utility classes (.igny8-table-*, .igny8-header-metric-*)
|
||||
3. Deprecated utility classes (marked below - do not use in new code)
|
||||
=================================================================== */
|
||||
|
||||
/* === CSS CUSTOM PROPERTIES (Variables) === */
|
||||
/* Import tokens from centralized tokens.css */
|
||||
@import "./tokens.css";
|
||||
|
||||
/* Legacy variable aliases for backward compatibility */
|
||||
/* These allow old code using --igny8-* to continue working */
|
||||
:root {
|
||||
--igny8-blue: var(--color-primary);
|
||||
--igny8-blue-dark: var(--color-primary-dark);
|
||||
--igny8-green: var(--color-success);
|
||||
--igny8-green-dark: var(--color-success-dark);
|
||||
--igny8-amber: var(--color-warning);
|
||||
--igny8-amber-dark: var(--color-warning-dark);
|
||||
--igny8-red: var(--color-danger);
|
||||
--igny8-red-dark: var(--color-danger-dark);
|
||||
--igny8-purple: var(--color-purple);
|
||||
--igny8-purple-dark: var(--color-purple-dark);
|
||||
--igny8-navy-bg: var(--color-navy);
|
||||
--igny8-navy-bg-2: var(--color-navy-light);
|
||||
--igny8-surface: var(--color-surface);
|
||||
--igny8-panel: var(--color-panel);
|
||||
--igny8-panel-2: var(--color-panel-alt);
|
||||
--igny8-text: var(--color-text);
|
||||
--igny8-text-dim: var(--color-text-dim);
|
||||
--igny8-text-light: var(--color-text-light);
|
||||
--igny8-stroke: var(--color-stroke);
|
||||
--igny8-radius: var(--radius-base);
|
||||
--igny8-gradient-blue: var(--gradient-primary);
|
||||
--igny8-gradient-success: var(--gradient-success);
|
||||
--igny8-gradient-warning: var(--gradient-warning);
|
||||
--igny8-gradient-danger: var(--gradient-danger);
|
||||
--igny8-gradient-purple: var(--gradient-purple);
|
||||
--igny8-gradient-panel: var(--gradient-panel);
|
||||
}
|
||||
|
||||
/* ===================================================================
|
||||
DEPRECATED UTILITY CLASSES
|
||||
===================================================================
|
||||
⚠️ DO NOT USE IN NEW CODE
|
||||
These classes are deprecated. Use Tailwind utilities or React components instead:
|
||||
- .igny8-bg-blue → bg-brand-500 or bg-[var(--color-primary)]
|
||||
- .igny8-text-blue → text-brand-500 or text-[var(--color-primary)]
|
||||
- .igny8-border-blue → border-brand-500 or border-[var(--color-primary)]
|
||||
|
||||
Migration: Replace with Tailwind utilities or use Button/Badge/Card components.
|
||||
=================================================================== */
|
||||
|
||||
/* === Background Colors (DEPRECATED) === */
|
||||
.igny8-bg-blue { background-color: var(--igny8-blue); }
|
||||
.igny8-bg-blue-dark { background-color: var(--igny8-blue-dark); }
|
||||
.igny8-bg-green { background-color: var(--igny8-green); }
|
||||
.igny8-bg-green-dark { background-color: var(--igny8-green-dark); }
|
||||
.igny8-bg-amber { background-color: var(--igny8-amber); }
|
||||
.igny8-bg-amber-dark { background-color: var(--igny8-amber-dark); }
|
||||
.igny8-bg-red { background-color: var(--igny8-red); }
|
||||
.igny8-bg-red-dark { background-color: var(--igny8-red-dark); }
|
||||
.igny8-bg-purple { background-color: var(--igny8-purple); }
|
||||
.igny8-bg-purple-dark { background-color: var(--igny8-purple-dark); }
|
||||
.igny8-bg-navy { background-color: var(--igny8-navy-bg); }
|
||||
.igny8-bg-navy-2 { background-color: var(--igny8-navy-bg-2); }
|
||||
.igny8-bg-surface { background-color: var(--igny8-surface); }
|
||||
.igny8-bg-panel { background-color: var(--igny8-panel); }
|
||||
.igny8-bg-panel-2 { background-color: var(--igny8-panel-2); }
|
||||
|
||||
/* === Text Colors === */
|
||||
.igny8-text-blue { color: var(--igny8-blue); }
|
||||
.igny8-text-blue-dark { color: var(--igny8-blue-dark); }
|
||||
.igny8-text-green { color: var(--igny8-green); }
|
||||
.igny8-text-green-dark { color: var(--igny8-green-dark); }
|
||||
.igny8-text-amber { color: var(--igny8-amber); }
|
||||
.igny8-text-amber-dark { color: var(--igny8-amber-dark); }
|
||||
.igny8-text-red { color: var(--igny8-red); }
|
||||
.igny8-text-red-dark { color: var(--igny8-red-dark); }
|
||||
.igny8-text-purple { color: var(--igny8-purple); }
|
||||
.igny8-text-purple-dark { color: var(--igny8-purple-dark); }
|
||||
.igny8-text-primary { color: var(--igny8-text); }
|
||||
.igny8-text-dim { color: var(--igny8-text-dim); }
|
||||
.igny8-text-light { color: var(--igny8-text-light); }
|
||||
|
||||
/* === Border Colors === */
|
||||
.igny8-border-blue { border-color: var(--igny8-blue); }
|
||||
.igny8-border-blue-dark { border-color: var(--igny8-blue-dark); }
|
||||
.igny8-border-green { border-color: var(--igny8-green); }
|
||||
.igny8-border-amber { border-color: var(--igny8-amber); }
|
||||
.igny8-border-red { border-color: var(--igny8-red); }
|
||||
.igny8-border-purple { border-color: var(--igny8-purple); }
|
||||
.igny8-border-stroke { border-color: var(--igny8-stroke); }
|
||||
|
||||
/* === Gradient Backgrounds === */
|
||||
.igny8-gradient-blue { background: var(--igny8-gradient-blue); }
|
||||
.igny8-gradient-success { background: var(--igny8-gradient-success); }
|
||||
.igny8-gradient-warning { background: var(--igny8-gradient-warning); }
|
||||
.igny8-gradient-danger { background: var(--igny8-gradient-danger); }
|
||||
.igny8-gradient-purple { background: var(--igny8-gradient-purple); }
|
||||
.igny8-gradient-panel { background: var(--igny8-gradient-panel); }
|
||||
|
||||
/* === Tailwind Gradient Utilities (for use with bg-gradient-to-*) === */
|
||||
.igny8-from-blue { --tw-gradient-from: var(--igny8-blue); --tw-gradient-to: var(--igny8-blue-dark); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
|
||||
.igny8-to-blue-dark { --tw-gradient-to: var(--igny8-blue-dark); }
|
||||
.igny8-from-green { --tw-gradient-from: var(--igny8-green); --tw-gradient-to: var(--igny8-green-dark); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
|
||||
.igny8-to-green-dark { --tw-gradient-to: var(--igny8-green-dark); }
|
||||
.igny8-from-amber { --tw-gradient-from: var(--igny8-amber); --tw-gradient-to: var(--igny8-amber-dark); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
|
||||
.igny8-to-amber-dark { --tw-gradient-to: var(--igny8-amber-dark); }
|
||||
.igny8-from-purple { --tw-gradient-from: var(--igny8-purple); --tw-gradient-to: var(--igny8-purple-dark); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
|
||||
.igny8-to-purple-dark { --tw-gradient-to: var(--igny8-purple-dark); }
|
||||
|
||||
/* === Border Radius === */
|
||||
.igny8-rounded { border-radius: var(--igny8-radius); }
|
||||
.igny8-rounded-xl { border-radius: calc(var(--igny8-radius) * 2); }
|
||||
.igny8-rounded-2xl { border-radius: calc(var(--igny8-radius) * 3); }
|
||||
|
||||
/* === Hover States === */
|
||||
.igny8-hover-blue:hover { background-color: var(--igny8-blue-dark); }
|
||||
.igny8-hover-green:hover { background-color: var(--igny8-green-dark); }
|
||||
.igny8-hover-amber:hover { background-color: var(--igny8-amber-dark); }
|
||||
|
||||
/* === Card Styles (matching WordPress plugin) === */
|
||||
.igny8-card {
|
||||
background: var(--igny8-panel);
|
||||
border: 1px solid var(--igny8-stroke);
|
||||
border-radius: var(--igny8-radius);
|
||||
padding: 18px;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10), 0 4px 10px rgba(13, 27, 42, 0.06);
|
||||
transition: box-shadow 0.25s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.igny8-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14), 0 8px 20px rgba(13, 27, 42, 0.10);
|
||||
}
|
||||
|
||||
.igny8-card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12px;
|
||||
background: var(--igny8-gradient-blue);
|
||||
color: white;
|
||||
padding: 12px 16px;
|
||||
border-radius: var(--igny8-radius) var(--igny8-radius) 0 0;
|
||||
margin: -10px -10px 12px -10px;
|
||||
}
|
||||
|
||||
/* === Button Styles === */
|
||||
.igny8-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 4px 12px;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
line-height: 1.3;
|
||||
border: none;
|
||||
border-radius: var(--igny8-radius);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease-in-out;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.igny8-btn-primary {
|
||||
background: var(--igny8-blue);
|
||||
}
|
||||
|
||||
.igny8-btn-primary:hover {
|
||||
background: var(--igny8-blue-dark);
|
||||
}
|
||||
|
||||
.igny8-btn-success {
|
||||
background: var(--igny8-green);
|
||||
}
|
||||
|
||||
.igny8-btn-success:hover {
|
||||
background: var(--igny8-green-dark);
|
||||
}
|
||||
|
||||
.igny8-btn-warning {
|
||||
background: var(--igny8-amber);
|
||||
}
|
||||
|
||||
.igny8-btn-warning:hover {
|
||||
background: var(--igny8-amber-dark);
|
||||
}
|
||||
|
||||
.igny8-btn-danger {
|
||||
background: var(--igny8-red);
|
||||
}
|
||||
|
||||
.igny8-btn-danger:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
/* === Badge Styles === */
|
||||
.igny8-badge {
|
||||
padding: 4px 10px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #fff;
|
||||
white-space: nowrap;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.igny8-badge-primary { background: var(--igny8-blue); }
|
||||
.igny8-badge-success { background: var(--igny8-green); }
|
||||
.igny8-badge-warning { background: var(--igny8-amber); }
|
||||
.igny8-badge-danger { background: var(--igny8-red); }
|
||||
.igny8-badge-purple { background: var(--igny8-purple); }
|
||||
|
||||
/* ===================================================================
|
||||
COMPACT LAYOUT STYLES (Global - Apply to all pages)
|
||||
=================================================================== */
|
||||
|
||||
/* === Table Compact Styles === */
|
||||
/* Table header styling - larger font, taller height, differentiated from body */
|
||||
.igny8-table-compact th {
|
||||
padding: 12px 16px !important; /* Increased height for headers */
|
||||
font-size: 14px !important; /* Larger font for headers */
|
||||
font-weight: 600 !important;
|
||||
color: var(--color-gray-600) !important; /* gray-600 - darker for better visibility */
|
||||
text-align: left !important;
|
||||
background-color: var(--color-gray-50) !important; /* Light gray background */
|
||||
border-bottom: 2px solid var(--color-gray-200) !important; /* Thicker bottom border */
|
||||
text-transform: capitalize;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
|
||||
.dark .igny8-table-compact th {
|
||||
color: var(--color-gray-200) !important; /* Lighter text for dark mode */
|
||||
background-color: rgba(15, 23, 42, 0.5) !important; /* Dark gray background */
|
||||
border-bottom-color: rgba(255, 255, 255, 0.1) !important;
|
||||
}
|
||||
|
||||
/* Table body cell styling - reduced padding for data density */
|
||||
.igny8-table-compact td {
|
||||
padding: 8px 12px !important; /* Reduced padding for body cells */
|
||||
font-size: 14px !important; /* Consistent size across all cells */
|
||||
border-bottom: 1px solid var(--color-gray-200) !important;
|
||||
}
|
||||
|
||||
.dark .igny8-table-compact td {
|
||||
border-bottom-color: rgba(255, 255, 255, 0.05) !important;
|
||||
}
|
||||
|
||||
/* === Compact Input/Select Styles === */
|
||||
.igny8-input-compact,
|
||||
.igny8-select-compact {
|
||||
height: 36px !important; /* Reduced from h-11 (44px) */
|
||||
padding: 6px 12px !important; /* Reduced padding */
|
||||
font-size: 13px !important;
|
||||
}
|
||||
|
||||
/* === Compact Button Styles === */
|
||||
.igny8-btn-compact {
|
||||
padding: 6px 12px !important;
|
||||
font-size: 13px !important;
|
||||
height: 36px !important;
|
||||
}
|
||||
|
||||
.igny8-btn-compact-sm {
|
||||
padding: 4px 10px !important;
|
||||
font-size: 12px !important;
|
||||
height: 32px !important;
|
||||
}
|
||||
|
||||
/* === Styled Dropdown/Select === */
|
||||
.igny8-select-styled {
|
||||
background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23647085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
|
||||
background-repeat: no-repeat !important;
|
||||
background-position: right 12px center !important;
|
||||
padding-right: 36px !important;
|
||||
}
|
||||
|
||||
.dark .igny8-select-styled {
|
||||
background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2398A2B3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
|
||||
}
|
||||
|
||||
/* Native select dropdown styling (limited but improved) */
|
||||
select.igny8-select-styled {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select.igny8-select-styled option {
|
||||
padding: 10px 12px !important;
|
||||
background: white !important;
|
||||
color: var(--color-gray-700) !important;
|
||||
font-size: 13px !important;
|
||||
}
|
||||
|
||||
select.igny8-select-styled option:hover {
|
||||
background: var(--color-gray-100) !important;
|
||||
}
|
||||
|
||||
select.igny8-select-styled option:checked {
|
||||
background: var(--color-purple-100) !important;
|
||||
color: var(--color-purple-600) !important;
|
||||
font-weight: 600 !important;
|
||||
}
|
||||
|
||||
.dark select.igny8-select-styled option {
|
||||
background: var(--color-gray-800) !important;
|
||||
color: var(--color-gray-200) !important;
|
||||
}
|
||||
|
||||
.dark select.igny8-select-styled option:hover {
|
||||
background: var(--color-gray-700) !important;
|
||||
}
|
||||
|
||||
.dark select.igny8-select-styled option:checked {
|
||||
background: var(--color-purple-900) !important;
|
||||
color: var(--color-purple-200) !important;
|
||||
}
|
||||
|
||||
/* === Header Metrics Bar (compact, right-aligned) === */
|
||||
.igny8-header-metrics {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 12px;
|
||||
background: transparent;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 2px 6px 3px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.dark .igny8-header-metrics {
|
||||
background: transparent;
|
||||
box-shadow: 0 2px 6px 3px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.igny8-header-metric {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.igny8-header-metric-separator {
|
||||
width: 1px;
|
||||
height: 16px;
|
||||
background: rgb(203 213 225); /* slate-300 */
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.dark .igny8-header-metric-separator {
|
||||
background: rgb(148 163 184); /* slate-400 */
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.igny8-header-metric-label {
|
||||
font-size: 13px; /* increased from 10px by 25%+ */
|
||||
font-weight: 500;
|
||||
text-transform: capitalize;
|
||||
letter-spacing: 0.3px;
|
||||
color: rgb(100 116 139); /* slate-500 */
|
||||
}
|
||||
|
||||
.dark .igny8-header-metric-label {
|
||||
color: rgb(148 163 184); /* slate-400 */
|
||||
}
|
||||
|
||||
.igny8-header-metric-value {
|
||||
font-size: 16px; /* increased from 14px */
|
||||
font-weight: 700;
|
||||
color: rgb(30 41 59); /* slate-800 */
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
/* Credits-specific value - 20% smaller than other metrics */
|
||||
.igny8-header-metric-value-credits {
|
||||
font-size: 13px; /* 16px * 0.8 = 12.8px ≈ 13px */
|
||||
}
|
||||
|
||||
.dark .igny8-header-metric-value {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.igny8-header-metric-accent {
|
||||
width: 4px;
|
||||
height: 20px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.igny8-header-metric-accent.blue {
|
||||
background: var(--igny8-blue);
|
||||
}
|
||||
|
||||
.igny8-header-metric-accent.green {
|
||||
background: var(--igny8-green);
|
||||
}
|
||||
|
||||
.igny8-header-metric-accent.amber {
|
||||
background: var(--igny8-amber);
|
||||
}
|
||||
|
||||
.igny8-header-metric-accent.purple {
|
||||
background: var(--igny8-purple);
|
||||
}
|
||||
|
||||
/* === Difficulty Badge Special Styling === */
|
||||
.difficulty-badge {
|
||||
border-radius: 3px !important;
|
||||
min-width: 28px !important;
|
||||
display: inline-flex !important;
|
||||
justify-content: center !important;
|
||||
align-items: center !important;
|
||||
}
|
||||
|
||||
/* Very Hard (5) - Darker error background (not maroon, just darker error red) */
|
||||
.difficulty-badge.difficulty-very-hard {
|
||||
background-color: var(--color-error-600) !important; /* red-600 - darker than bg-error-500 (red-500) */
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.dark .difficulty-badge.difficulty-very-hard {
|
||||
background-color: var(--color-error-600) !important; /* red-600 - darker error */
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
/* Center align Difficulty column header and cells */
|
||||
.igny8-table-compact th.text-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.igny8-table-compact td.text-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
/* Smooth Table Height Transitions - Improved */
|
||||
.igny8-table-container {
|
||||
min-height: 500px; /* Stable height during loading */
|
||||
transition: min-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
position: relative;
|
||||
overflow: hidden; /* Prevent scrollbar jumping during loading */
|
||||
/* Force layout stability */
|
||||
will-change: min-height;
|
||||
}
|
||||
|
||||
.igny8-table-container.loading {
|
||||
min-height: 500px;
|
||||
overflow: hidden !important; /* Force hide all scrollbars during loading */
|
||||
/* Prevent any layout shifts */
|
||||
contain: layout style paint;
|
||||
}
|
||||
|
||||
.igny8-table-container.loaded {
|
||||
min-height: auto;
|
||||
overflow: visible;
|
||||
transition: min-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
/* Smooth reveal */
|
||||
animation: fadeInContainer 0.3s ease-out;
|
||||
}
|
||||
|
||||
@keyframes fadeInContainer {
|
||||
from {
|
||||
opacity: 0.95;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Table wrapper to prevent horizontal scrollbar jumping */
|
||||
.igny8-table-wrapper {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
/* Initially hide scrollbars completely */
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
/* Smooth scrollbar appearance */
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
|
||||
transition: opacity 0.4s ease-in-out;
|
||||
/* Prevent layout shift */
|
||||
contain: layout;
|
||||
}
|
||||
|
||||
/* Hide scrollbars during loading - use multiple approaches */
|
||||
.igny8-table-container.loading .igny8-table-wrapper {
|
||||
overflow-x: hidden !important; /* Force hide horizontal scroll */
|
||||
overflow-y: hidden !important;
|
||||
/* Hide scrollbar track */
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
|
||||
.igny8-table-container.loading .igny8-table-wrapper::-webkit-scrollbar {
|
||||
display: none !important; /* Hide webkit scrollbars */
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
}
|
||||
|
||||
.igny8-table-container.loaded .igny8-table-wrapper {
|
||||
overflow-x: auto; /* Show scrollbar only when loaded and stable */
|
||||
overflow-y: hidden;
|
||||
/* Smooth scrollbar fade-in */
|
||||
animation: showScrollbar 0.4s ease-out 0.3s both;
|
||||
}
|
||||
|
||||
@keyframes showScrollbar {
|
||||
from {
|
||||
scrollbar-width: none;
|
||||
}
|
||||
to {
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
}
|
||||
|
||||
/* Ensure table has stable width from start */
|
||||
.igny8-table-smooth {
|
||||
width: 100%;
|
||||
table-layout: fixed; /* Use fixed layout for stability */
|
||||
min-width: 100%; /* Prevent width jumping */
|
||||
transition: opacity 0.5s ease-in-out;
|
||||
/* Prevent layout shifts */
|
||||
contain: layout;
|
||||
}
|
||||
|
||||
.igny8-table-container.loading .igny8-table-smooth {
|
||||
opacity: 0.8;
|
||||
/* Force stable rendering */
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.igny8-table-container.loaded .igny8-table-smooth {
|
||||
opacity: 1;
|
||||
table-layout: auto; /* Switch to auto after loaded for better column sizing */
|
||||
transition: opacity 0.5s ease-in-out, table-layout 0.1s ease-out;
|
||||
}
|
||||
|
||||
/* Table body transitions */
|
||||
.igny8-table-body {
|
||||
position: relative;
|
||||
min-height: 450px; /* Fixed minimum height during loading */
|
||||
transition: min-height 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease-in-out;
|
||||
/* Prevent layout shifts */
|
||||
contain: layout;
|
||||
}
|
||||
|
||||
.igny8-table-container.loading .igny8-table-body {
|
||||
min-height: 450px;
|
||||
opacity: 1;
|
||||
/* Lock height during transition */
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.igny8-table-container.loaded .igny8-table-body {
|
||||
min-height: 0;
|
||||
opacity: 1;
|
||||
/* Smooth height adjustment */
|
||||
transition: min-height 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
/* Smooth fade transition between skeleton and content */
|
||||
.igny8-table-container.loading .igny8-table-body > tr:not(.igny8-skeleton-row) {
|
||||
display: none !important; /* Force hide data rows during loading */
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.igny8-table-container.loaded .igny8-table-body > tr.igny8-skeleton-row {
|
||||
display: none !important; /* Force hide skeleton rows after loading */
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Smooth row appearance for data rows */
|
||||
.igny8-data-row {
|
||||
animation: fadeInRow 0.6s ease-out forwards;
|
||||
opacity: 0;
|
||||
/* Smooth entrance */
|
||||
transform: translateY(8px);
|
||||
}
|
||||
|
||||
@keyframes fadeInRow {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(8px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Disable animation for skeleton rows */
|
||||
.igny8-skeleton-row {
|
||||
animation: none !important;
|
||||
opacity: 1 !important;
|
||||
transform: none !important;
|
||||
/* Keep visible during loading */
|
||||
display: table-row !important;
|
||||
}
|
||||
|
||||
/* Prevent any flash of unstyled content */
|
||||
.igny8-table-container.loading * {
|
||||
/* Prevent any content jumps */
|
||||
backface-visibility: hidden;
|
||||
perspective: 1000px;
|
||||
}
|
||||
Reference in New Issue
Block a user