stubbornella/csslint — Issue #212: Incorrect column reported when parsing hex values and !important
Author: jadimmock
Created: 2011-11-24 21:09:40+00:00
State: open

I've implemented some custom rules that make use of the col of the property name and value, however when parsing properties featuring hex values and !important the col of the property value appears to be reported incorrectly. Example:

```css
.foo {
color: #fff !important;
}
```

When listening to the property event, I'd expect property.parts[0].col to equal 12. Instead I get 16 (the space after #fff). The values of event.property and event.value are:

```javascript
event.property: { col: 5, line: 2, text: 'color', type: 4, hack: null }
event.value: { col: undefined,
line: undefined,
text: '#fff',
type: 5,
parts:
[ { col: 16,
line: 2,
text: '#fff',
type: 'color',
red: 255,
green: 255,
blue: 255 } ] }
```

This issue does not occur in the following cases (col 12 is reported):

```css
.bar {
color: red !important;
}

.baz {
color: #f00;
}
```

PS: Thanks for a great tool :)