Skip to content

Add automatic Tailwind CSS compilation to Blazor Server build#440

Merged
StuartFerguson merged 3 commits into
mainfrom
copilot/fix-screens-not-showing
Jan 3, 2026
Merged

Add automatic Tailwind CSS compilation to Blazor Server build#440
StuartFerguson merged 3 commits into
mainfrom
copilot/fix-screens-not-showing

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 3, 2026

The Blazor Server application's UI was not rendering correctly due to missing compiled Tailwind CSS. The app referenced wwwroot/css/app.css which was never generated from the source Styles/app.css.

Changes

  • MSBuild Integration: Added build targets to automatically compile Tailwind CSS

    • NpmInstall: Runs conditionally only when node_modules is missing
    • BuildTailwindCSS: Executes npm run css:build before each build
    • Both targets fail fast with ContinueOnError="false"
  • Documentation: Updated README with build prerequisites and development workflow

<Target Name="NpmInstall" BeforeTargets="BuildTailwindCSS" Condition="!Exists('node_modules')">
  <Message Importance="high" Text="Installing npm packages..." />
  <Exec Command="npm install" WorkingDirectory="$(MSBuildProjectDirectory)" ContinueOnError="false" />
</Target>

<Target Name="BuildTailwindCSS" BeforeTargets="BeforeBuild">
  <Message Importance="high" Text="Building Tailwind CSS..." />
  <Exec Command="npm run css:build" WorkingDirectory="$(MSBuildProjectDirectory)" ContinueOnError="false" IgnoreExitCode="false" />
</Target>

Before / After

Before: Navigation rendered as unstyled inline text
Before

After: Proper sidebar navigation with styling
After - Dashboard
After - Estate Management

Original prompt

This section details on the original issue you should resolve

<issue_title>Screens not showing correctly</issue_title>
<issue_description>Example of Estate Management

Image</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 3, 2026 17:18
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
…dd error handling

Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix screens not showing correctly in estate management Add automatic Tailwind CSS compilation to Blazor Server build Jan 3, 2026
Copilot AI requested a review from StuartFerguson January 3, 2026 17:20
@StuartFerguson StuartFerguson marked this pull request as ready for review January 3, 2026 17:44
@StuartFerguson StuartFerguson merged commit 436679e into main Jan 3, 2026
5 checks passed
@github-actions github-actions Bot deleted the copilot/fix-screens-not-showing branch March 5, 2026 01:02
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.

Screens not showing correctly

2 participants