Skip to content

Latest commit

 

History

History
67 lines (46 loc) · 1.75 KB

File metadata and controls

67 lines (46 loc) · 1.75 KB

DotnetDevKR.TailwindCSS.WebTest/wwwroot

Purpose

Static web assets served by the Blazor WebAssembly application. Contains the HTML shell, compiled CSS, and image assets.

Key Files

  • index.html - Application entry point / HTML shell

    • Loads Blazor WebAssembly runtime
    • References CSS stylesheets
    • Contains <div id="app"> for Blazor mounting
  • favicon.png - Browser tab icon (small)

  • icon-192.png - PWA icon (192x192)

Subdirectories

  • css/ - CSS stylesheets (see below)

css/

  • app.css - Compiled TailwindCSS output (generated during build)
    • This is the OUTPUT file from TailwindCSS compilation
    • Do NOT edit manually - changes will be overwritten
    • Source: ../tailwind.css

For AI Agents

Important: Generated CSS

The css/app.css file is GENERATED by TailwindCSS compilation:

tailwind.css (input) → TailwindCSS CLI → wwwroot/css/app.css (output)

To modify styles:

  1. Edit tailwind.css at project root (not in wwwroot)
  2. Add TailwindCSS classes to Razor components
  3. Build the project

Static File Serving

In Blazor WebAssembly, files in wwwroot/ are:

  • Served at root path (e.g., /css/app.css)
  • Cached by the browser
  • Included in published output

HTML Shell Structure

index.html typically includes:

<link href="css/app.css" rel="stylesheet" />
<script src="_framework/blazor.webassembly.js"></script>

Adding New Assets

  1. Place files in wwwroot/ or subdirectories
  2. Reference via root-relative paths: /images/logo.png
  3. For CSS, prefer TailwindCSS utilities over additional files

Dependencies

  • Blazor WebAssembly runtime (_framework/)
  • Compiled CSS from TailwindCSS