I have a total of 3 files dedicated to my Login-Screen: Login.aspx
, Login.aspx.cs
, and LoginStyle.css
Upon the execution of the Page_Load
method, I retrieve various data from the current system, including the theme-color represented as a string (e.g., #003b67).
Within my .css file, I have defined 3 style rules that are meant to utilize this color.
.linkButtonPassword:hover {
color: #38d39f;
}
.login-input-div.focus > .login-faItem > i {
color: #38d39f;
}
.login-input-div:before, .login-input-div:after {
content: '';
position: absolute;
bottom: -2px;
width: 0%;
height: 2px;
background-color: #38d39f;
transition: .4s;
}
Therefore, my query is whether there exists a way to substitute the current color-string ""#38d39f"" with the color retrieved from the code behind without explicitly specifying the style within my .aspx file? (Is it possible to access a variable of sorts within my css file)