I have an scss function like this
@function dpx($size) {
@return calc(var(--dpx, 10px) * #{$size});
}
This is working fine like this:
h1 {
font-size: dpx(1.6);
}
But I think it's a little verbose since I need to use it everywhere and I want to make this function more feels like a unit.
I know sass is a precompiler, can I somehow to make the following syntax compiles into dpx(1.6)?
h1 {
font-size: 1.6dpx;
}