according to https://www.w3.org/TR/css-syntax-3/, if the stylesheet ends while any rule, declaration, function, string, etc. are still open, everything is automatically closed.
[x] invalid at-rule
[x] invalid rule
[x] invalid declaration
[x] invalid declaration with invalid function
[x] invalid declaration with invalid string
[x] invalid declaration with invalid function and comment
[x] invalid declaration with invalid string and comment
according to https://www.w3.org/TR/css-syntax-3/, if the stylesheet ends while any rule, declaration, function, string, etc. are still open, everything is automatically closed.