Replace Sass-built shared.css with plain CSS files - #928
Replace Sass-built shared.css with plain CSS files#928eduardosmaniotto wants to merge 7 commits into
Conversation
d05bf9a to
dd87666
Compare
- Load the colocated LogFiles.razor.js module via its static web asset path (./_content/...), matching the convention used by ThemeSelector and MapEditor. The previous relative path resolved against the web root and 404'd, which broke log auto-scroll. - Drop the hardcoded table-light thead class and bg-light card-header class so the file list follows the selected theme like all other admin panel tables and cards.
ReviewNice cleanup — dropping the The concerns below are about the parts that are not 1:1. 1. Losing
|
- Decide the primary-color story: accept Bootstrap defaults and align --omu-link-primary/-border with them (#0d6efd/#0b5ed7, both modes), so ReconnectModal buttons match every other primary button. - Rewrite scoped-css bundle @imports as base-relative (../../_content/...) so they resolve both at the site root and under UsePathBase (e.g. PATH_BASE=/map); match single- and double-quoted forms. - Factor the bundle-import rewrite into shared src/Web/ScopedCssBundleImports.targets, imported by AdminPanel and Map, and revert whitespace churn in the AdminPanel workaround comment. - forms.css: drop the leftover .valid.modified selector from the auto-form search rule; document that Bootstrap's own validation visuals stay intentionally unused. tables.css: note the row fade-in animation was intentionally removed. - Remove dead Sass toolchain leftovers: BuildWebCompiler2022 version pin, Web Compiler docs requirement, .sass-cache gitignore entry. - LogFiles.razor: use a private const for the JS module path, like PacketGrid does.
Re-review of
|
- ScopedCssBundleImports.targets: capture the opening quote in the @import rewrite so double-quoted imports keep balanced quotes instead of producing malformed CSS; also match whitespace-free @import'...' forms. - ConnectServerConfiguration.razor: add form-control to the five class-less inputs so they render as Bootstrap inputs instead of browser-default controls once Blazor stamps validation classes.
Summary
Removes the Sass build chain from
MUnique.OpenMU.Web.Sharedand replacesthe generated
shared.css/shared.min.cssbundle with plain, hand-maintainableCSS files plus stock Bootstrap 5.3.8.
What changed
Styles/*.scss,Styles/bootstrap-5.3.8/,compilerconfig.json(.defaults),shared.css/shared.min.css;removed
BuildWebCompiler2022and theCompileSasstarget from the csproj(incl. a dead
compilerconfig.jsonreference in ItemEditor).Web.Shared/wwwroot/css:bootstrap.min.css(stock 5.3.8),theme.css,navigation.css,main.css,forms.css,tables.css,common.css,log.css,map-editor.css. Custom rules were extracted 1:1from the last compiled output (mechanically verified
declaration-for-declaration); the
Tables.scssstagger loop(
@keyframes FadeIn+ 50tr:nth-child(n)rules) was intentionallyremoved, and the
Forms.scss/MapEditor.scss@extends were replacedwith standalone/grouped selectors on Bootstrap default variables.
bootstrap-overrides.css):$primary: #1b6ec2and the disabled validation icons are not restored.--omu-link-primary/-borderwere aligned to the Bootstrap defaults(
#0d6efd/#0b5ed7, both modes) so ReconnectModal buttons match everyother primary button. Trade-off: reskinning Bootstrap now needs explicit
override rules instead of one Sass variable.
as separate files instead of
shared.css, in bootstrap → open-iconic →theme order. (Differs from the old bundle, where open-iconic's passthrough
@importcame first — no practical impact, the new order is the better one.)src/Web/ScopedCssBundleImports.targets(imported by both, runs after
BundleScopedCssFiles, idempotent) thatrewrites the SDK's root-relative bundle
@import '_content/...'rules tobase-relative
../../_content/..., since these bundles are served fromtheir
StaticWebAssetBasePath. Works at the site root and underUsePathBase(e.g.PATH_BASE=/map).(
./_content/..., same convention asPacketGrid); removed hardcodedtable-lightthead andbg-lightcard-header classes so the file listfollows the selected theme; added
form-controlto the five class-lessinputs in
ConnectServerConfiguration.razor.BuildWebCompiler2022version pin,Web Compiler docs requirement,
.sass-cachegitignore entry.