question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Select Dropdown: CSS parsing error breaks the editor

See original GitHub issue

CSS does not support inline comments, which makes this line break the editor and throw the following error:

{
  "name": "CssSyntaxError",
  "reason": "Unknown word",
  "source": "\n\tz-index:1000000;;\n\topacity: 1;\n\toutline: none;\n\ttransition: 40ms opacity linear;\n\ttransition-delay: 20ms; // Allows for the popover to reposition without being seen.\n",
  "line": 6,
  "column": 26,
  "message": "<css input>:6:26: Unknown word",
  "input": {
    "line": 6,
    "column": 26,
    "source": "\n\tz-index:1000000;;\n\topacity: 1;\n\toutline: none;\n\ttransition: 40ms opacity linear;\n\ttransition-delay: 20ms; // Allows for the popover to reposition without being seen.\n"
  }
}

When the comment is removed, the error is gone and the page loads normally. Also, notice how this line is appending an extra semicolon ("source": "\n\tz-index:1000000;; (...)). It doesn’t seem to be breaking anything but probably worth addressing as well.

cc @ItsJonQ @sarayourfriend

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ItsJonQcommented, Feb 22, 2021

Thanks for reporting this @WunderBart !! Will push an update immediately

1reaction
fullofcaffeinecommented, Feb 23, 2021

It’s worth documenting here that there’s a suspicion that the culprit might have been related to https://github.com/MohammadYounes/rtlcss. Which is used only when an RTL language is active (i.e., Arabic or Hebrew).

Read more comments on GitHub >

github_iconTop Results From Across the Web

css - what is a parse error and how do I fix it - Stack Overflow
It looks like a space, walks like a space, quacks like a space, but it still isn't a space, in CSS parsing. So...
Read more >
Handling common HTML and CSS problems - MDN Web Docs
Basically, it is a matter of checking whether your HTML and CSS code is well formed and doesn't contain any syntax errors.
Read more >
HTML DOM Select add() Method - W3Schools
The add() method is used to add an option to a drop-down list. Tip: To remove an option from a drop-down list, use...
Read more >
jsoneditor/HISTORY.md at develop - GitHub
Upgraded to the latest version of Ace editor, 1.4.7. Fixed #824: Parse errors not displayed with bottom right error icon in modes code...
Read more >
Content Configuration - Tailwind CSS
Class detection in-depth. The way Tailwind scans your source code for classes is intentionally very simple — we don't actually parse or execute...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found