Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False-positive with the CSS :not pseudo-class #1354

Closed
jeandeaual opened this issue Oct 19, 2022 · 0 comments
Closed

False-positive with the CSS :not pseudo-class #1354

jeandeaual opened this issue Oct 19, 2022 · 0 comments
Assignees
Labels
status: completed Work completed, can be closed type: false-positive This issue is about valid content being incorrectly rejected
Milestone

Comments

@jeandeaual
Copy link

With the following content:

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
  <head>
    <title>CSS test for :not</title>
    <style>
      @namespace epub "http://www.idpf.org/2007/ops";

      :not(nav.class) > h1 {
        color: blue;
      }

      :not(nav[epub|type="landmarks"]) > h1 {
        text-decoration: underline;
      }
    </style>
  </head>
  <body>
    <nav epub:type="toc">
      <h1>Table of Contents</h1>
    </nav>
    <nav epub:type="landmarks">
      <h1>Guide</h1>
    </nav>
  </body>
</html>

EPUBCheck lists these two errors:

Validating using EPUB version 3.2 rules.
ERROR(CSS-008): epubcheck-issue.epub/EPUB/xhtml/epubcheck-issue.xhtml(10,21): An error occurred while parsing the CSS: Token ")" not allowed here.
ERROR(CSS-008): epubcheck-issue.epub/EPUB/xhtml/epubcheck-issue.xhtml(14,25): An error occurred while parsing the CSS: Token "=" not allowed here.

Check finished with errors
Messages: 0 fatals / 2 errors / 0 warnings / 0 infos

EPUBCheck completed

The CSS appears to be correct, so I believe EPUBCheck should not report any errors.

Here's a small EPUB file that reproduces the issue (renamed to .zip, otherwise it wouldn't upload):
epubcheck-issue.zip

@rdeltour rdeltour added this to the v5.0.0-beta milestone Nov 17, 2022
@rdeltour rdeltour added status: accepted Ready to be further processed type: false-positive This issue is about valid content being incorrectly rejected labels Nov 17, 2022
@rdeltour rdeltour self-assigned this Nov 17, 2022
@rdeltour rdeltour added status: in progress The issue is being implemented by the development team and removed status: accepted Ready to be further processed labels Nov 17, 2022
@rdeltour rdeltour added status: completed Work completed, can be closed and removed status: in progress The issue is being implemented by the development team labels Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: completed Work completed, can be closed type: false-positive This issue is about valid content being incorrectly rejected
Projects
None yet
Development

No branches or pull requests

2 participants