The selector for Goto Symbol in a CSS file is meta.selector, which appears to be matching leading whitespace before the start of a selector.
Test case:
body {
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial;
background-color: #f6f6f6;
text-align: center;
}
h1 {
margin-top: 100px;
font-size: 4.0em;
color: #333;
}
FWIW, I _think_ the reason it does that is to make sure that ,-separated selectors are grouped together into the same meta scope. A fix should either maintain that or make an argument why it shouldn't be that way.
Test cases:
h1, h2 {
margin-top: 100px;
font-size: 4.0em;
color: #333;
}
h1 , h2 {
margin-top: 100px;
font-size: 4.0em;
color: #333;
}
h1,
h2 {
margin-top: 100px;
font-size: 4.0em;
color: #333;
}
Whitespace between parts of a selector sounds fine, it is the leading whitespace that is an issue.
Currently there are two issues:
Maybe a general question about what to include into meta scopes and into the index in the end. The meta.selector may in general be meant to return the whole region, we expect selectors (including leading and trailing ws) in or it might be limited to the real selector string (excluding leading and trailing ws).
While indexing the whole meta.selector to group the single entities may by the best compromise atm, a general solution to only index the h1, h2 separately would make more sense.
Most helpful comment
Maybe a general question about what to include into meta scopes and into the index in the end. The
meta.selectormay in general be meant to return the whole region, we expect selectors (including leading and trailing ws) in or it might be limited to the real selector string (excluding leading and trailing ws).While indexing the whole
meta.selectorto group the single entities may by the best compromise atm, a general solution to only index theh1,h2separately would make more sense.