Skip to content

Commit a070501

Browse files
authored
Fix. Creating a Blazor project with a space in its name breaks the styling (#62675)
1 parent 74f0f5b commit a070501

File tree

2 files changed

+14
-1
lines changed
  • src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp

2 files changed

+14
-1
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/template.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,19 @@
323323
},
324324
"replaces": "44300"
325325
},
326+
"StyleBundleName":{
327+
"type": "generated",
328+
"generator": "regex",
329+
"replaces": "StyleBundleName",
330+
"parameters": {
331+
"source": "name",
332+
"steps": [
333+
{
334+
"regex": " ",
335+
"replacement": "_"
336+
}]
337+
}
338+
},
326339
"InteractivityPlatform": {
327340
"type": "parameter",
328341
"datatype": "choice",

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/App.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<link rel="stylesheet" href="@Assets["lib/bootstrap/dist/css/bootstrap.min.css"]" />
1111
##endif*@
1212
<link rel="stylesheet" href="@Assets["app.css"]" />
13-
<link rel="stylesheet" href="@Assets["BlazorWebCSharp.1.styles.css"]" />
13+
<link rel="stylesheet" href="@Assets["StyleBundleName.styles.css"]" />
1414
<ImportMap />
1515
@*#if (SampleContent)
1616
<link rel="icon" type="image/png" href="favicon.png" />

0 commit comments

Comments
 (0)