Reputation: 2410
I have installed Install-Package bootstrap.sass
in ASP .net core 3.1.
It has installed bootstrap.js
and scss
folder. But how to compile the bootrap.scss and use that in the _Layout?
I tried to import the bootstrap from scss but it gives me the error as:
The NuGet has installed the following file:
Upvotes: 8
Views: 11589
Reputation: 813
You can follow the steps below to set up Bootstrap 5 SASS using ASPNET Core.
$primary: #00ffff;
$white:white;
@import "../lib/bootstrap/scss/bootstrap";
nav.navbar {
background: linear-gradient($primary, $white)
}
... ...
@*<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />*@
<link href="~/css/bootstrap.custom.css" rel="stylesheet" />
... ...
@*<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>*@
... ...
Upvotes: 28