I am new to SCSS and frontend development in general. I have this simple rule defined in a .scss
file.
.header-logo {
content: url('/assets/logo/logotype-blue.png');
height : 40px;
}
My goal is to have a class containing my header image so I can use it on every header in different pages. The problem is when I use that rule like this:
<img class="header-logo" alt="logo"/>
The image is rendered but the height
constraint is not applied.
When I remove the class to have something like this:
<img src="/assets/logo/logotype-blue.png" height="40" alt="logo"/>
The height
constraint is well applied. I am a bit confused, some explanations would be very helpful.