cssgroovydsl

Missing `breakInside` rule on GrooCSS


I am using GrooCSS 1.0-GA to write CSS. Unfortunately, it seems like GrooCSS doesn't support breakInside so the following code:

GrooCSS.process(new Config(prettyPrint: true)) {
  body {
    breakInside 'avoid'
  }
}.tap {
  println it
}

produces the following error:

No signature of method: org.groocss.StyleGroup.breakInside() is applicable for argument types: (String) values: [avoid]

Is there a way to escape or to write rules that are not implemented by GrooCSS? I must have missed this on the documentation.

I am aware that pageBreakInside exists but I would rather be able to use both if possible.


Solution

  • Have you tried replacing

    breakInside 'avoid'
    

    With

    raw 'break-inside: avoid;'
    

    Or

    add style('break-inside', 'avoid')