How to manage text inside SCSS?
When I try to add 001 inside content it will not work an example: content: '$variable';
Is it technically possible to manage this kind of element?
$variable: 001;
content: $variable;
How to manage text inside SCSS?
When I try to add 001 inside content it will not work an example: content: '$variable';
Is it technically possible to manage this kind of element?
$variable: 001;
content: $variable;
The purpose of SCSS to make it easier or more organized:
$color-dark-02: #2f2f2f;
which I have in a partial file called _color_theme_1.scss;
then in my main scss file:
.repository {
text-decoration: none;
color: #21759b;
transition: color 0.5s ease;
&:hover {
color: $color-dark-02;
}
}
I don’t know anything about SASS but the content property takes a string so i would guess you need to do this (which seems to work in codepen with SCSS enabled).
$variable: "001";
div:before{
content:$variable;
}
Or you can do this I think but you lose the leading zeros.
$variable: 009;
div:before{
content:"" $variable;
}
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.