I have the following css code:
div {
--height: 1.5em;
line-height: var(--height);
background-image: repeating-linear-gradient(transparent 0 var(--height), green var(--height) calc(var(--height) * 2));
}
<div>Stack Overflow is a question and answer website for professional and enthusiast programmers. It is the flagship site of the Stack Exchange Network,[4][5][6] created in 2008 by Jeff Atwood and Joel Spolsky.[7][8] It features questions and answers on a
wide range of topics in computer programming.[9][10][11] It was created to be a more open alternative to earlier question and answer websites such as Experts-Exchange. Stack Overflow was sold to Prosus, a Netherlands-based consumer internet conglomerate,
on 2 June 2021 for $1.8 billion.[12]</div>
This css
code does work well, but I am not sure why, the sublime text don't recognize the calc()
as a built-in function.
It does display properly even though the sublime text doesn't recognize the calc()
, but could anyone explain to me a little bit why this happens?
It looks something like this:
Thanks for any responds!