Remove Tailwind, implement plain CSS design system #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "10-remove-tailwind-plain-css"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
:root, mobile-first with 600px breakpoint, semantic BEM-lite namingChanges
Gemfile/Gemfile.lock-- removedtailwindcss-railsgem and all transitive dependenciesapp/assets/tailwind/application.css-- deleted (was@import "tailwindcss")app/assets/builds/.keep-- deleted (no longer needed without Tailwind build output)app/assets/stylesheets/application.css-- full design system: tokens in:root, reset, layout, navbar, flash messages, hero, cards, buttons, forms, login, dashboard componentsapp/views/layouts/application.html.erb-- replaced Tailwind utility classes with semantic classes, switched stylesheet tag from:appto"application"app/views/pages/home.html.erb-- semantic classes (.hero,.card-grid,.card,.section-heading)app/views/contacts/_form.html.erb--.form > .fieldpattern per CSS guideapp/views/contacts/new.html.erb--.contact-pagewrapperapp/views/sessions/new.html.erb--.login-pagewith.btn .btn-primary .btn-lgapp/views/dashboard/index.html.erb--.dashboard-grid,.dashboard-card,.is-successstateProcfile.dev-- removedcss: bin/rails tailwindcss:watchREADME.md-- updated stack table from "Tailwind" to "plain CSS"Test Plan
docker build -t pal-enterprises .succeeds (no Tailwind build step needed)noticeandalert:roottokensReview Checklist
Related Notes
pal-enterprises-- the project this work belongs toQA Review -- PR #15
Tailwind Removal
tailwindcss-railsremoved, no residual gem referencestailwindcss-railsandtailwindcss-rubyentries removed (GEM, DEPENDENCIES, CHECKSUMS sections)app/assets/tailwind/application.cssdeletedapp/assets/builds/.keepdeletedProcfile.dev:css: bin/rails tailwindcss:watchline removedtailwindstring in any.rb,.erb,.css, or.ymlfileCSS Guide Compliance (ror-css-guide)
var(--token)-- zero hardcoded hex outside:root--color-accent: #0366d6,--max-width: 48rem, Atkinson Hyperlegible font@media (min-width: 600px)breakpoint.form > .fieldpattern -- no classes on individual inputs.navbar-brand,.card-title,.dashboard-card)View Migrations
layouts/application.html.erb: Tailwind utilities replaced with.navbar,.container,.flashclasses. Stylesheet tag fixed from:appto"application"(Propshaft convention)pages/home.html.erb:.hero,.card-grid,.card,.section-headingcontacts/_form.html.erb:.form > .fieldpattern,.btn .btn-primary .btn-fullcontacts/new.html.erb:.contact-pagewrappersessions/new.html.erb:.login-page,.btn .btn-primary .btn-lgdashboard/index.html.erb:.dashboard-grid,.dashboard-card,.is-successstate classConstraints Respected
Note
Gemfile.lockwas manually edited (not regenerated viabundle install) due to missing native dependencies in the build environment. The Docker build will regenerate a correct lockfile viabundle installduring image creation. This is acceptable for this PR.VERDICT: PASS
PR #15 Review
DOMAIN REVIEW
Tech stack: Ruby on Rails 8.1, ERB views, plain CSS (Propshaft), no JS framework changes.
This is a CSS-only refactor: replacing Tailwind utility classes with a semantic plain CSS design system. The domain checklist is CSS/frontend quality.
CSS Quality Assessment
The CSS design system is well-structured and follows the conventions documented in
arch-rails-app::root-- all colors, spacing, fonts, radii use custom properties. No hardcoded hex values outside:root. This is correct..hero-title,.card-grid, and.dashboard-grid. Matches the documented convention.View: pages/home.html.erb, etc.). Good for maintainability..card-title,.dashboard-card-link,.flash-notice,.btn-primary) is consistent throughout.--spacing-*tokens. No magic pixel values.Minor CSS observations (non-blocking):
--max-width: 48remreplaces the old Tailwindmax-w-5xl(64rem). This is a deliberate narrowing of the content area from 1024px to 768px. Not a bug -- just a design decision worth noting since it significantly changes the layout feel on wide screens.box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08)appears in.navbar,.card, and.dashboard-card. Could be extracted to a--shadowtoken for DRY consistency, but this is not a blocker for a CSS file of this size.*, *::before, *::after { ... }) removes all default list markers and margins globally. This is fine since the app controls all rendering, but worth noting for future contributors.View Template Assessment
All ERB views are cleanly converted from Tailwind utility classes to semantic classes. The 1:1 mapping is complete:
layouts/application.html.erb-- layout, navbar, flash messages all use semantic classespages/home.html.erb-- hero, card-grid, section-headingcontacts/_form.html.erb--.form > .fieldpattern with proper.actionswrappersessions/new.html.erb--.login-pagewith reusable.btnclassesdashboard/index.html.erb--.dashboard-grid,.dashboard-card,.is-successstate modifierThe
stylesheet_link_tagcorrectly changes from:app(Tailwind bundle name) to"application"(Propshaft default). This is the critical fix.Gemfile/Lockfile
tailwindcss-railsand all transitive deps (tailwindcss-rubyplatform variants) cleanly removed from bothGemfileandGemfile.lock. TheProcfile.devcorrectly drops thecss: bin/rails tailwindcss:watchline.Accessibility
No regressions detected. The original Tailwind-based views had no ARIA attributes, and neither do the new ones. Focus styles are present on form inputs (
:focuswithbox-shadowoutline). This is acceptable for the current state of the app but should be addressed as the app matures.BLOCKERS
None.
On test coverage: This PR has no automated tests, but this is not a blocker for the following reasons:
rails/test_unit/railtieis commented out inconfig/application.rb, notest/orspec/directory exists).On secrets: No secrets, credentials, API keys, or
.envfiles in the diff.On security: No user input handling changes. No auth logic changes. No SQL or XSS surface introduced.
NITS
Shadow token extraction -- The
rgba(0, 0, 0, 0.08)shadow value is repeated 3 times. Consider adding--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08)to:rootand referencing it. Low priority.max-widthnarrowing ----max-width: 48remis significantly narrower than the previousmax-w-5xl(64rem). If this was intentional, no action needed. If it should match the old width, update to64rem.Font loading --
--font-bodyreferences'Atkinson Hyperlegible'but there is no@font-facedeclaration or Google Fonts import in the CSS or layout. The font will silently fall back tosystem-ui. If Atkinson Hyperlegible is desired, a font import should be added in a follow-up.SOP COMPLIANCE
10-remove-tailwind-plain-cssreferences issue #10)pal-enterprisesproject andCloses #10PROCESS OBSERVATIONS
arch-rails-app.arch-rails-appnote in pal-e-docs still lists CSS as "Tailwind (broken)" -- should be updated post-merge to reflect plain CSS.ci.yml) does not reference Tailwind directly, so no CI changes needed. Thescan_ruby,scan_js, andlintjobs should pass without modification.VERDICT: APPROVED