reworkcss / css

CSS parser / stringifier for Node.js
MIT License
1.58k stars 259 forks source link

Missing support for @page selectors #22

Closed necolas closed 6 years ago

necolas commented 10 years ago

Parsing:

@page :left {
  color:red;
}

results in Error: @page missing '}'

NB: it should also work for :right, :first and :blank but also for :blank:first

See: http://www.w3.org/TR/css3-page/#page-selectors

Also,

it would be great if the parser was lazy enough to accept the named page syntax princexml uses:

@page big_table { 
    size: A4 landscape;
}

and also:

@page big_table, big_table2:first { 
    size: A4 landscape;
}

which all are valid syntax: see http://www.w3.org/TR/css3-page/#syntax-page-selector

(Moved from https://github.com/reworkcss/css-parse/issues/79)

mtlehtin commented 8 years ago

+1

We have the same issue when parsin third party css (AlloyUI)

@page {
    .aui {
      margin: 0.5cm; } }

Is causing error: missing '}'

btakita commented 5 years ago

I'm still getting this issue as of 2.2.4