TeselaGen / openVectorEditor

DEPRECATED - Teselagen's Open Source Vector/Plasmid Editor Component
https://teselagen.github.io/tg-oss/ove/#/Editor
MIT License
200 stars 72 forks source link

Error parsing open-vector-editor/es/CircularView/style.css #858

Closed nicolazilio closed 1 year ago

nicolazilio commented 1 year ago

@tnrich

Hello,

when building (react-scripts build) after upgrading to OVE 18.1.0, I receive this error

./node_modules/open-vector-editor/es/CircularView/style.css
ParserError: Syntax Error at line: 3, column 21

I traced back the error to here

  background: linear-gradient(var(--bg), var(--bg)) content-box,
    linear-gradient(var(--v), #ccc 50%, transparent 0) 0 /
      min(100%, (50 - var(--p)) * 100%),
    linear-gradient(var(--v), transparent 50%, #4ac5ed 0) 0 /
      min(100%, (var(--p) - 50) * 100%),
    linear-gradient(to right, #ccc 50%, #4ac5ed 0);

adding calc to the operations with var(--x) solves the issue

  background: linear-gradient(var(--bg), var(--bg)) content-box,
    linear-gradient(var(--v), #ccc 50%, transparent 0) 0 /
      min(100%, calc(50 - var(--p)) * 100%),
    linear-gradient(var(--v), transparent 50%, #4ac5ed 0) 0 /
      min(100%, calc(var(--p) - 50) * 100%),
    linear-gradient(to right, #ccc 50%, #4ac5ed 0);
tnrich commented 1 year ago

@nicolazilio interesting. I don't see builds failing for me. Would you mind putting a PR in with that change and I can publish a new version for you?

Thanks!

tnrich commented 1 year ago

@nicolazilio bump on this one.

nicolazilio commented 1 year ago

Sure, I can do that, but maybe it's my set up that is 'weird'. I have adapted your plasmid viewer project for my needs, see here, and now I just update the version of OVE when you release a new one. Could this explain the difference?

tnrich commented 1 year ago

@nicolazilio it looks like you're building your app that uses ove as a dep using CRA. My guess would be that there is some difference between the underlying build system for CRA and what the OVE project uses - nwb (https://github.com/insin/nwb for now at least).

Thanks in advance for the PR!

tnrich commented 1 year ago

@nicolazilio publishing v18.1.16 now. Let me know if that version fixes it for you.

nicolazilio commented 1 year ago

Yes, it works, thanks!