chevrotain icon indicating copy to clipboard operation
chevrotain copied to clipboard

diagrams.css should be scoped

Open AccessViolator opened this issue 4 years ago • 1 comments

Everything in diagrams.css should be scoped to some wrapping css class, because as is it cannot be bundled with the rest of an app's css because of styles like this:

div {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

svg {
    width: 100%;
}

Currently the only way to bundle it is a partial copy-paste.

AccessViolator avatar Feb 24 '20 13:02 AccessViolator

Thanks for reporting this @AccessViolator .

I believe this may be simple to fix. I will mark it as "Help Wanted"

Although am not sure where the relevant Div is created when generating the diagrams html source...

Relevant "places" to start:

  • https://github.com/SAP/chevrotain/tree/master/packages/chevrotain/diagrams
  • https://github.com/SAP/chevrotain/tree/master/examples/parser/diagrams
  • https://sap.github.io/chevrotain/docs/guide/generating_syntax_diagrams.html#examples

bd82 avatar Feb 24 '20 20:02 bd82