remove Tailwind + DaisyUI theme + heroicons plugin, admin fully custom CSS (Phase 7)
replace Tailwind CLI with esbuild for admin CSS bundling. admin now uses hand-written utility classes (admin/utilities.css), static heroicon CSS generated by mix generate_admin_icons, plain CSS colour themes extracted from DaisyUI plugin config, and minimal resets. rename app.css to admin.css for clarity alongside shop.css. delete vendor/daisyui-theme.js and vendor/heroicons.js. no Tailwind dependency remains in the project. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,8 +5,8 @@ defmodule SimpleshopThemeWeb.ThemeCSSConsistencyTest do
|
||||
|
||||
Architecture:
|
||||
- Both shop pages and preview use .themed class for shared styles
|
||||
- Theme editor uses .preview-frame[data-*] selectors for live switching (in app.css)
|
||||
- Shop pages get theme values via inline CSS from CSSGenerator (app-shop.css)
|
||||
- Theme editor uses .preview-frame[data-*] selectors for live switching (in admin.css)
|
||||
- Shop pages get theme values via inline CSS from CSSGenerator (shop.css)
|
||||
- Component styles use .themed for shared styling (theme-layer2-attributes.css)
|
||||
"""
|
||||
|
||||
@@ -90,13 +90,13 @@ defmodule SimpleshopThemeWeb.ThemeCSSConsistencyTest do
|
||||
end
|
||||
|
||||
describe "CSS file structure" do
|
||||
test "app.css has .preview-frame variant selectors for theme editor" do
|
||||
css_path = Path.join([File.cwd!(), "assets", "css", "app.css"])
|
||||
test "admin.css has .preview-frame variant selectors for theme editor" do
|
||||
css_path = Path.join([File.cwd!(), "assets", "css", "admin.css"])
|
||||
css_content = File.read!(css_path)
|
||||
|
||||
# Variant selectors are editor-only (.preview-frame) using CSS nesting
|
||||
# The file uses &[data-*] syntax inside .preview-frame { }
|
||||
# These rules are in app.css (admin only), not app-shop.css
|
||||
# These rules are in admin.css (admin only), not shop.css
|
||||
assert css_content =~ ".preview-frame"
|
||||
assert css_content =~ "&[data-mood=\"dark\"]"
|
||||
assert css_content =~ "&[data-mood=\"warm\"]"
|
||||
|
||||
Reference in New Issue
Block a user