Enhance UI styling with improved button hierarchy and form readability

Button improvements:
- Primary buttons now more prominent with shadow, larger padding, and hover effects
- Secondary buttons use ghost style for reduced visual weight
- Added transform animations for better interactivity
- Clear visual hierarchy between Create/Cancel actions

Form and layout improvements:
- Enhanced form inputs with better padding and hover states
- Fixed white background issue on input focus (now uses theme colors)
- Added browser autofill color fixes to prevent white-on-white text
- Improved placeholder text visibility with proper theme colors
- Added form-section card styling for better visual grouping

Page layout enhancements:
- Increased header padding and added subtle shadow
- Better typography hierarchy with larger headings
- Narrower content width (800px) for improved readability
- More breathing room between sections

CSS consolidation (continued):
- AspectRatioSelector.css: 88→42 lines (52% reduction)
- CreationActions.css: 96→57 lines (41% reduction)
- EmptyPresentationState.css: 129→27 lines (79% reduction)
- Updated components to use utility classes from application.css

All changes maintain theme consistency and work in both light/dark modes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Michael Mainguy 2025-08-21 14:17:06 -05:00
parent 9ab40b7169
commit eb8b88c6da
8 changed files with 208 additions and 324 deletions

View File

@ -1,88 +1,42 @@
.aspect-ratio-selection h2 {
font-size: 1.25rem;
font-weight: 600;
color: #1f2937;
margin-bottom: 0.5rem;
}
.section-description {
color: #6b7280;
margin-bottom: 1.5rem;
font-size: 0.875rem;
}
.aspect-ratio-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
margin-bottom: 2rem;
}
/* Uses utility classes in HTML: */
/* aspect-ratio-selection h2: .text-xl .font-semibold .text-primary .mb-2 */
/* section-description: .text-secondary .mb-6 .text-sm */
/* aspect-ratio-grid: .grid .grid-auto-fill-200 .gap-4 .mb-8 */
/* aspect-ratio-card: .card-compact .cursor-pointer with 2px border override */
/* aspect-ratio-preview: .flex .justify-center .items-center .mb-4 .rounded-lg */
/* Component-specific overrides only */
.aspect-ratio-card {
border: 2px solid #e5e7eb;
border-radius: 0.75rem;
padding: 1rem;
cursor: pointer;
transition: all 0.2s ease;
background: #ffffff;
border: 2px solid var(--border-primary);
}
.aspect-ratio-card:hover {
border-color: #3b82f6;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
border-color: var(--border-accent);
box-shadow: 0 4px 12px var(--bg-accent);
}
.aspect-ratio-card.selected {
border-color: #3b82f6;
background: #eff6ff;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
border-color: var(--border-accent);
background: var(--bg-accent);
box-shadow: 0 4px 12px var(--bg-accent);
}
.aspect-ratio-preview {
display: flex;
justify-content: center;
align-items: center;
height: 60px;
margin-bottom: 1rem;
background: #f9fafb;
border-radius: 0.5rem;
background: var(--bg-muted);
}
.preview-box {
background: #3b82f6;
background: var(--text-accent);
border-radius: 2px;
}
.preview-box.aspect-16-9 {
width: 48px;
height: 27px;
}
/* Preview box dimensions - component specific */
.preview-box.aspect-16-9 { width: 48px; height: 27px; }
.preview-box.aspect-4-3 { width: 40px; height: 30px; }
.preview-box.aspect-1-1 { width: 32px; height: 32px; }
.preview-box.aspect-4-3 {
width: 40px;
height: 30px;
}
.preview-box.aspect-1-1 {
width: 32px;
height: 32px;
}
.aspect-ratio-info h3 {
font-size: 1rem;
font-weight: 600;
color: #1f2937;
margin-bottom: 0.25rem;
}
.ratio-description {
color: #6b7280;
font-size: 0.75rem;
margin-bottom: 0.5rem;
}
.ratio-dimensions {
font-size: 0.75rem;
color: #9ca3af;
font-weight: 500;
}
/* Uses utility classes in HTML: */
/* aspect-ratio-info h3: .text-base .font-semibold .text-primary .mb-1 */
/* ratio-description: .text-secondary .text-xs .mb-2 */
/* ratio-dimensions: .text-xs .text-tertiary .font-medium */

View File

@ -1,96 +1,57 @@
/* Creation Actions Layout */
.creation-actions {
background: var(--bg-secondary);
border-radius: 0.75rem;
padding: 2rem;
border: 1px solid var(--border-primary);
margin-top: 2rem;
}
.selected-theme-info {
margin-bottom: 2rem;
margin-bottom: 1.5rem;
}
.theme-preview-info h3 {
font-size: 1.125rem;
font-size: 1rem;
font-weight: 600;
color: #1f2937;
margin-bottom: 0.5rem;
color: var(--text-primary);
margin: 0 0 0.5rem 0;
}
.theme-preview-info p {
color: #6b7280;
margin-bottom: 1rem;
line-height: 1.5;
color: var(--text-secondary);
margin: 0 0 0.75rem 0;
font-size: 0.875rem;
}
.theme-stats {
display: flex;
gap: 1rem;
font-size: 0.875rem;
color: #9ca3af;
font-size: 0.75rem;
}
.theme-stats span {
background: #f3f4f6;
padding: 0.25rem 0.5rem;
background: var(--bg-muted);
padding: 0.25rem 0.75rem;
border-radius: 0.25rem;
color: var(--text-tertiary);
}
.creation-error {
background: #fee2e2;
border: 1px solid #fca5a5;
border-radius: 0.5rem;
padding: 1rem;
margin-top: 1rem;
}
.creation-error p {
color: #dc2626;
margin: 0;
font-size: 0.875rem;
}
/* Action Buttons - Clear visual hierarchy */
.action-buttons {
display: flex;
justify-content: flex-end;
gap: 0.75rem;
padding-top: 2rem;
border-top: 1px solid #e5e7eb;
align-items: center;
gap: 1rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border-primary);
}
.button {
padding: 0.75rem 1.5rem;
border-radius: 0.5rem;
font-weight: 500;
font-size: 0.875rem;
border: none;
cursor: pointer;
transition: all 0.2s ease;
min-width: 120px;
/* Make primary action stand out */
.action-buttons .button.primary {
min-width: 180px;
}
.button:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.button.secondary {
background: #f9fafb;
color: #374151;
border: 1px solid #d1d5db;
}
.button.secondary:hover:not(:disabled) {
background: #f3f4f6;
border-color: #9ca3af;
}
.button.primary {
background: #3b82f6;
color: white;
}
.button.primary:hover:not(:disabled) {
background: #2563eb;
}
.button.primary:focus {
outline: 2px solid #3b82f6;
outline-offset: 2px;
.action-buttons .button.secondary {
min-width: 100px;
}

View File

@ -1,129 +1,27 @@
/* Uses utility classes in HTML: */
/* empty-presentation: .empty-content (from application.css) with min-h-32 override */
/* empty-content h2: .text-3xl .font-bold .text-primary .mb-4 */
/* empty-content > p: .text-lg .text-secondary .mb-8 */
/* theme-preview: .card .my-8 .text-left */
/* theme-preview h3: .text-xl .font-semibold .text-primary .mb-2 */
/* theme-description: .text-secondary .mb-6 .leading-normal */
/* available-layouts h4: .text-base .font-semibold .text-primary .mb-4 */
/* layouts-grid: .grid .gap-4 */
/* Component-specific overrides */
.empty-presentation {
display: flex;
justify-content: center;
align-items: center;
min-height: 400px;
padding: 2rem;
}
.empty-content {
text-align: center;
max-width: 600px;
}
.empty-content h2 {
font-size: 1.875rem;
font-weight: 700;
color: #1f2937;
margin-bottom: 1rem;
}
.empty-content > p {
font-size: 1.125rem;
color: #6b7280;
margin-bottom: 2rem;
}
.theme-preview {
background: #f9fafb;
border: 1px solid #e5e7eb;
border-radius: 0.75rem;
padding: 1.5rem;
margin: 2rem 0;
text-align: left;
}
.theme-preview h3 {
font-size: 1.25rem;
font-weight: 600;
color: #1f2937;
margin-bottom: 0.5rem;
}
.theme-description {
color: #6b7280;
margin-bottom: 1.5rem;
line-height: 1.5;
}
.available-layouts h4 {
font-size: 1rem;
font-weight: 600;
color: #374151;
margin-bottom: 1rem;
}
.layouts-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 1rem;
}
.layout-preview-card {
background: #ffffff;
border: 1px solid #d1d5db;
border-radius: 0.5rem;
padding: 1rem;
text-align: center;
}
/* Uses utility classes in HTML: */
/* layout-preview-card: .card-compact .text-center */
/* layout-name: .font-semibold .text-primary .text-sm .mb-2 .block */
/* layout-description: .text-secondary .text-xs .mb-2 .block */
/* slot-count: .text-tertiary .text-xs .font-medium */
/* more-layouts: .flex .items-center .justify-center .bg-muted .border .border-dashed .rounded-lg .text-secondary .text-sm .font-medium */
.layout-preview-card .layout-name {
font-weight: 600;
color: #1f2937;
font-size: 0.875rem;
margin-bottom: 0.5rem;
display: block;
}
.layout-preview-card .layout-description {
color: #6b7280;
font-size: 0.75rem;
margin-bottom: 0.5rem;
display: block;
}
.layout-preview-card .slot-count {
color: #9ca3af;
font-size: 0.75rem;
font-weight: 500;
}
.more-layouts {
display: flex;
align-items: center;
justify-content: center;
background: #f3f4f6;
border: 1px dashed #9ca3af;
border-radius: 0.5rem;
color: #6b7280;
font-size: 0.875rem;
font-weight: 500;
}
.action-button {
padding: 0.75rem 1.5rem;
border-radius: 0.5rem;
font-weight: 500;
font-size: 0.875rem;
border: none;
cursor: pointer;
transition: all 0.2s ease;
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
}
.action-button.primary {
background: #3b82f6;
color: white;
}
.action-button.primary:hover {
background: #2563eb;
}
.action-button.large {
padding: 1rem 2rem;
font-size: 1rem;
}
/* Uses .btn .btn-primary .btn-large classes from application.css */

View File

@ -1,67 +1,58 @@
/* Component uses utility classes: .page-container, .page-header, .page-content */
/* Component-specific styles only */
.header-content h1 {
font-size: 1.875rem;
font-weight: 700;
/* Back Button - Subtle navigation link */
.back-button {
background: transparent;
border: none;
color: var(--text-tertiary);
font-size: 0.875rem;
font-weight: 500;
padding: 0.5rem 1rem;
border-radius: 0.375rem;
cursor: pointer;
transition: all 0.2s ease;
margin-right: 1rem;
}
/* Uses utility classes: .flex .flex-col .gap-8 for creation-form */
/* Uses .card class for presentation-details, theme-selection, creation-actions */
/* Uses .form-group, .form-label, .form-input classes from application.css */
.creation-form {
gap: 3rem; /* Override default gap */
}
.section-description {
margin: 0 0 2rem 0;
}
.selected-theme-info {
flex: 1;
min-width: 0;
}
.theme-preview-info h3 {
margin: 0 0 0.5rem 0;
font-size: 1.125rem;
font-weight: 600;
.back-button:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.theme-preview-info p {
margin: 0 0 0.75rem 0;
color: var(--text-secondary);
font-size: 0.875rem;
/* Header Content */
.header-content {
flex: 1;
}
/* Creation Form - Better spacing and visual hierarchy */
.creation-form {
display: flex;
flex-direction: column;
gap: 2.5rem;
}
/* Uses .flex .gap-4 .text-xs utility classes for theme-stats */
/* Uses .badge-secondary class for theme-stats span */
/* Uses .alert-error class for creation-error */
/* Aspect Ratio Selection - uses .grid-auto-fill-250 .gap-4 */
.aspect-ratio-selection {
margin-bottom: 2rem;
}
/* Aspect Ratio Selection */
/* aspect-ratio-selection: .mb-8 */
/* aspect-ratio-grid: .grid-auto-fill-250 .gap-4 */
/* aspect-ratio-card: .card .border-2 .cursor-pointer */
/* aspect-ratio-preview: .flex .justify-center .items-center .border-dashed */
/* Aspect ratio cards extend .card base class */
/* Component-specific overrides only */
.aspect-ratio-card {
border: 2px solid var(--border-primary);
cursor: pointer;
border-width: 2px;
}
.aspect-ratio-card.selected {
border-color: var(--border-accent);
box-shadow: 0 4px 6px -1px var(--bg-accent);
background: var(--bg-accent);
}
/* Preview content - component specific */
.aspect-ratio-preview {
height: 80px;
background: var(--bg-primary);
border: 1px dashed var(--border-secondary);
}
.preview-box {

View File

@ -127,7 +127,7 @@ export const NewPresentationPage: React.FC = () => {
</button>
<div className="header-content">
<h1>Create New Presentation</h1>
<p>Choose a theme and enter details for your new presentation</p>
<p>Enter details for your new presentation</p>
</div>
</header>

View File

@ -15,10 +15,10 @@ export const PresentationDetailsForm: React.FC<PresentationDetailsFormProps> = (
onDescriptionChange
}) => {
return (
<section className="presentation-details">
<section className="form-section">
<h2>Presentation Details</h2>
<div className="form-group">
<label htmlFor="title">Title *</label>
<label htmlFor="title" className="form-label">Title *</label>
<input
id="title"
type="text"
@ -31,13 +31,13 @@ export const PresentationDetailsForm: React.FC<PresentationDetailsFormProps> = (
</div>
<div className="form-group">
<label htmlFor="description">Description</label>
<label htmlFor="description" className="form-label">Description</label>
<textarea
id="description"
value={description}
onChange={(e) => onDescriptionChange(e.target.value)}
placeholder="Optional description of your presentation"
className="form-textarea"
className="form-textarea form-input"
rows={3}
/>
</div>

View File

@ -23,4 +23,7 @@
color: #92400e;
margin: 0;
font-size: 0.875rem;
}
.theme-preview-info {
display: none;
}

View File

@ -253,15 +253,29 @@
.page-header {
background: var(--bg-secondary);
border-bottom: 1px solid var(--border-primary);
padding: 1.5rem 2rem;
padding: 2rem;
display: flex;
align-items: center;
gap: 1.5rem;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}
.page-header h1 {
font-size: 2rem;
font-weight: 700;
color: var(--text-primary);
margin: 0;
}
.page-header p {
font-size: 1rem;
color: var(--text-secondary);
margin: 0.25rem 0 0 0;
}
.page-content {
padding: 2rem;
max-width: 1200px;
padding: 3rem 2rem;
max-width: 800px;
margin: 0 auto;
}
@ -279,6 +293,24 @@
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
/* Form Section Card - Better visual separation */
.form-section {
background: var(--bg-secondary);
border: 1px solid var(--border-primary);
border-radius: 0.75rem;
padding: 2rem;
margin-bottom: 1.5rem;
}
.form-section h2 {
font-size: 1.25rem;
font-weight: 600;
color: var(--text-primary);
margin: 0 0 1.5rem 0;
padding-bottom: 0.75rem;
border-bottom: 1px solid var(--border-primary);
}
.card-compact {
padding: 1rem;
}
@ -315,7 +347,7 @@
}
/* Buttons */
.btn {
.btn, .button {
display: inline-flex;
align-items: center;
justify-content: center;
@ -328,31 +360,48 @@
text-decoration: none;
border: none;
box-sizing: border-box;
position: relative;
}
.btn:disabled {
.btn:disabled, .button:disabled {
cursor: not-allowed;
opacity: 0.5;
}
.btn-primary {
/* Primary Button - More prominent with shadow and stronger colors */
.btn-primary, .button.primary {
background: var(--text-accent);
color: white;
font-weight: 600;
padding: 0.875rem 2rem;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
transform: translateY(0);
}
.btn-primary:hover:not(:disabled) {
.btn-primary:hover:not(:disabled), .button.primary:hover:not(:disabled) {
background: var(--text-link-hover);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.08);
transform: translateY(-1px);
}
.btn-secondary {
background: var(--bg-primary);
.btn-primary:active:not(:disabled), .button.primary:active:not(:disabled) {
transform: translateY(0);
box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}
/* Secondary Button - Less prominent, ghost style */
.btn-secondary, .button.secondary {
background: transparent;
color: var(--text-tertiary);
border: 1px solid var(--border-secondary);
font-weight: 400;
padding: 0.625rem 1.25rem;
}
.btn-secondary:hover:not(:disabled), .button.secondary:hover:not(:disabled) {
background: var(--bg-muted);
color: var(--text-secondary);
border: 1px solid var(--border-primary);
}
.btn-secondary:hover:not(:disabled) {
background: var(--bg-hover);
color: var(--text-primary);
border-color: var(--border-primary);
}
.btn-danger {
@ -393,7 +442,7 @@
/* Form Elements */
.form-group {
margin-bottom: 1.5rem;
margin-bottom: 1.75rem;
}
.form-group:last-child {
@ -402,34 +451,62 @@
.form-label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
margin-bottom: 0.625rem;
font-weight: 600;
color: var(--text-primary);
font-size: 0.875rem;
letter-spacing: 0.025em;
}
.form-input {
.form-input, .form-textarea {
width: 100%;
padding: 0.75rem;
border: 1px solid var(--border-secondary);
padding: 0.875rem 1rem;
border: 1.5px solid var(--border-secondary);
border-radius: 0.5rem;
font-size: 0.875rem;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
font-size: 0.9375rem;
transition: all 0.2s ease;
background: var(--bg-secondary);
color: var(--text-primary);
box-sizing: border-box;
}
.form-input:focus {
.form-input:hover, .form-textarea:hover {
border-color: var(--border-primary);
}
.form-input:focus, .form-textarea:focus {
outline: none;
border-color: var(--border-accent);
box-shadow: 0 0 0 3px var(--bg-accent);
background: var(--bg-secondary);
color: var(--text-primary);
}
/* Prevent browser autofill from using white background */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-textarea:-webkit-autofill,
.form-textarea:-webkit-autofill:hover,
.form-textarea:-webkit-autofill:focus {
-webkit-text-fill-color: var(--text-primary);
-webkit-box-shadow: 0 0 0px 1000px var(--bg-secondary) inset;
transition: background-color 5000s ease-in-out 0s;
background: var(--bg-secondary) !important;
}
/* Placeholder text styling */
.form-input::placeholder,
.form-textarea::placeholder {
color: var(--text-muted);
opacity: 0.7;
}
.form-textarea {
resize: vertical;
min-height: 80px;
min-height: 100px;
font-family: inherit;
line-height: 1.5;
}
/* Error States */