@irkode Yeah, any CSS change I want to make, I always open the whole theme on Visual Studio and have to make changes there, usually to _main.scss. Anyway…
Ok, so I added <div class="background-container"></div>
to the baseof.html file.
“add a /assets/scss/_background.scss defining the container class. No html tag selectors. Move the gradient into the container class” How do I do this part? Simply take out the html {
at the top of my code I posted and the last }
?
In my code, when I try to replace
rgba(var(--primary-rgb), 0.075) 0%,
rgba(var(--primary-rgb), 0.075) 100%
and
var(--tertiary-hover) 0%,
var(--tertiary) 100%
with:
background-color: #ededed; 0%,
background-color: #ededed; 100%
and
background-color: #313131; 0%,
background-color: #099dd7; 100%
I start getting a lot of errors like:
![rrrr](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/2/1/21518a72116bcc950bc4b78a8d0c6af6d435866a.png)
but when I do what Visual Studio says to fix them, it still has errors. If I don’t try to change the var’s to “background-color
” then what you said (if I followed it correctly) still didn’t change the background.
EDIT: Figured out the proper scss format ( I think) below…
But what I did to follow what you said was:
-Add <div class="background-container"></div>
to body of baseof.html.
-Add @import "background";
to style.scss above the “main” import, so it looks like:
@import "background";
@import "main";
-Create a _background.scss in assets/scss.
-Put this in the _background.scss file:
@import "_variables";
body {
background: linear-gradient(
0deg,
rgba(var($rgba-color), 0.075) 0%,
rgba(var($rgba-color), 0.075) 100%
),
linear-gradient(0deg, var($varsecondary) 100%, var($varsecondary) 100%);
}
.background-container {
position: fixed;
top: 0;
left: 0;
height: 100vh;
width: 100vw;
background: linear-gradient(
90deg,
var($tertiary3hover) 0%,
var($tertiary2) 100%
);
clip-path: ellipse(148% 70% at 91% -14%);
}
That gave me no change on the site’s background. My variable colors I added are:
$rgba-color: rgba(237, 237, 237, 1);
$tertiary2: #313131;
$tertiary3hover: #099dd7;
$varsecondary: #303030;
The body section of my baseof.html looks like:
<body>
<div class="background-container"></div>
{{- partial "header.html" . -}}
<main>
{{- block "main" . }}{{- end }}
</main>
{{- partial "footer.html" . -}}
</body>