• Resolved tapiohuuhaa

    (@tapiohuuhaa)


    According to my experience Code Snippet might highlight wrong } when it show CSS.

    This is serious because if you have missing } with @media rule, the layout might be catastrophically broken.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    The syntax highlighting does not affect the actual code itself when it runs, so I don’t believe this would cause an error.

    I can look into improving the CSS highlighting, but keep in mind that the editor is tailored more to highlighting PHP code over other languages.

    Thread Starter tapiohuuhaa

    (@tapiohuuhaa)

    Because it doesn’t show correct end tags for @media {…} that is for me a quite big problem, because I have much CSS inside snippets.

    It might even mix CSS } to } relating with PHP. See.

    See an example: https://www.sanaristikkofoorumi.net/wordpress/wp-content/uploads/2019-08-28-11.40.34-www.sanaristikkofoorumi.net-4a58ab31e39b.png

    The problem might relate with situations, when } is together with another } like

    @media{
    and …}}

    But even in the end } of a media rule is in a separate row it might highlight incorrectly end } of an individual statement. Highlight of { + } is very unreliable if the code is CSS.

    Weird but when the code is JavaScript Code Snippets highlight code reliable.

    It would be nice if Code Snippet could call the inter CSS validator of WordPress, but at least try to fix showing paired parenthesis, especially {+}.

    Unpaired { & } characters might crash the layout of the site. Other CSS syntax errors are not critical because they affect only into one statement.

    The next important issue with CSS is checking “,”. If a statement has too much “,” browser ignores the whole statement.

    .something[..{ is not very bad but checking [] correctly would nice. The same concerns also ” and ‘ characters. These are basic syntaxes, which concerns also PHP.

    • This reply was modified 5 years, 6 months ago by tapiohuuhaa.
    • This reply was modified 5 years, 6 months ago by tapiohuuhaa.
    Thread Starter tapiohuuhaa

    (@tapiohuuhaa)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Showing }’ is closed to new replies.