Incorrect column reported when parsing hex values and !important #212

jadimmock opened this Issue Nov 24, 2011 · 0 comments


None yet
2 participants

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:

.foo {
    color: #fff !important;

When listening to the property event, I'd expect[0].col to equal 12. Instead I get 16 (the space after #fff). The values of and event.value are:  { col: 5, line: 2, text: 'color', type: 4, hack: null }
event.value:  { col: undefined,
  line: undefined,
  text: '#fff',
  type: 5,
   [ { 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):

.bar {
    color: red !important;

.baz {
    color: #f00;

PS: Thanks for a great tool :)

@nzakas nzakas closed this in 536e416 Nov 28, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment