Skip to content

Migrate remaining CSS classes to Tailwind CSS#151

Merged
diamantidis merged 1 commit intosourcefrom
tailwind-migration
Feb 9, 2026
Merged

Migrate remaining CSS classes to Tailwind CSS#151
diamantidis merged 1 commit intosourcefrom
tailwind-migration

Conversation

@diamantidis
Copy link
Copy Markdown
Owner

Summary

This PR completes the migration of remaining CSS classes from _scss/custom.scss to Tailwind CSS. The migration followed a step-by-step iterative approach, completing 93% of feasible styles.

What was migrated

Layout Components

  • ✅ Post header H1 margin
  • ✅ Break long word utility (with custom hyphens-auto utility)
  • ✅ Blockquote styling
  • ✅ Page header text alignment
  • ✅ Special headings (Bio, Personal, Stack)

Typography & Links

Header Component

  • ✅ Site header base styles (shadow, border)
  • ✅ Site header wrapper layout
  • ✅ Site title and navigation styles
  • ✅ Mobile navigation with peer-based checkbox toggle

Animation

  • ✅ Read more arrow animation using Tailwind arbitrary values

Content Styling

  • ✅ Post content paragraphs
  • ✅ List item descriptions (Xcode shortcuts post)

What was kept in CSS (intentionally)

The following styles were kept in CSS for complexity and maintainability reasons:

  • CSS variables (~40 lines) - color scheme, dark mode variables
  • Global base styles (~10 lines) - body, global links
  • Pseudo-elements (~8 lines) - :after for post links
  • Generated content (~80 lines) - code blocks, gists, GitHub cards, responsive media queries
  • Complex selectors (~5 lines) - post-content links with multiple pseudo-classes
  • Keyframes (~10 lines) - animation keyframes (used by Tailwind)

Fixes

  • Fixed social icons layout on mobile devices (stacked below title, left-aligned)
  • Fixed header layout consistency (two-row structure on all devices)
  • Fixed about page text color in dark mode
  • Fixed navigation menu text color in dark mode

Statistics

  • Lines removed from custom.scss: ~104 (34% reduction)
  • Lines remaining: 198 (intentionally kept)
  • Migration completion: 93% of feasible styles
  • Commits squashed: 22 → 1

Files Modified

  • _includes/header.html
  • _layouts/home.html
  • _layouts/page.html
  • _layouts/post.html
  • _scss/custom.scss
  • tailwind.config.js
  • _posts/2018-12-09-xcode-shortcuts-and-custom-key-bindings.md

Testing

Please test:

  • Header layout on both mobile and desktop
  • Dark mode navigation and text colors
  • Post and page content styling
  • Code blocks and gists
  • Responsive behavior at various breakpoints

Migrate remaining CSS classes to Tailwind with step-by-step approach:

Layout Components:
- Post header H1 margin (added mb-0)
- Break long word utility (break-words hyphens-auto with custom hyphens)
- Blockquote styling (added to @layer utilities)
- Page header text alignment (text-center)
- Special headings (Bio, Personal, Stack in @layer utilities)
- Post link and page title styles (with :after pseudo-element kept in CSS)
- Site header base styles (shadow, border with arbitrary values)
- Site header wrapper layout (already done in PR #150)
- Site title and navigation styles
- Mobile header responsive styles (already done in PR #150)

Typography:
- All typography migrated using Tailwind classes and CSS variables
- Responsive design with md: breakpoints

Animation:
- Read more arrow animation using hover:animate-[...] with keyframes in CSS

Header Fixes:
- Fixed social icons layout on mobile (stacked vertically below title)
- Fixed header layout consistency (two-row structure on all devices)
- Fixed navigation menu text color in dark mode (restored CSS rule)
- Fixed mobile menu hover state (use text color instead of undefined bg variable)

Page Fixes:
- Fixed about page text color in dark mode (text-[var(--title-color)])

Content:
- Migrated list_item_description to text-[0.8em] in Xcode shortcuts post
- Removed ~104 lines of dead CSS from custom.scss (34% reduction)
- CSS now 198 lines (mostly variables, generated content, keyframes)

Files Modified:
- _includes/header.html (navigation, mobile menu, social icons)
- _layouts/home.html (post links, excerpt)
- _layouts/page.html (page header, content)
- _layouts/post.html (post header, title)
- _scss/custom.scss (removed dead rules, kept necessary CSS)
- tailwind.config.js (added custom hyphens utility)
- _posts/2018-12-09-xcode-shortcuts-and-custom-key-bindings.md (list item descriptions)

Migration Statistics:
- 14 migration steps completed
- 93% of feasible styles migrated
- 22 commits squashed into 1
- ~104 lines of CSS removed

Kept in CSS (intentionally):
- CSS variables (light/dark mode colors)
- Global base styles (body, global links)
- Pseudo-elements (:after for post links)
- Generated content (code blocks, gists, GitHub cards)
- Complex responsive media queries
- Post content links with complex pseudo-classes
- Animation keyframes (used by Tailwind arbitrary values)

Phase 2 migration complete!
@diamantidis diamantidis self-assigned this Feb 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 9, 2026

Proselint found issues

_posts/2018-12-09-xcode-shortcuts-and-custom-key-bindings.md

Line Message Severity
97 'post!!' is hyperbolic. warning
97 More than 30 ppm of exclamations. Keep them under control. warning
97 Stop yelling. Keep your exclamation points under control. warning

Spell Checker found issues

_posts/2018-12-09-xcode-shortcuts-and-custom-key-bindings.md

Line Typo
40 * Add breakpoint ( + \)
<span class="
40 >A breakpoint will be added to the line. To

Generated by 🚫 Danger

@diamantidis diamantidis merged commit 67a7395 into source Feb 9, 2026
2 checks passed
@diamantidis diamantidis deleted the tailwind-migration branch February 9, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant