Skip to content
This repository was archived by the owner on Dec 9, 2018. It is now read-only.

CSS selectors in base.css are case sensitive #226

Description

@sathomas

Looking at the Scientific Paper example from README.md, there are at least two selectors that are case sensitive, .Bi and .bi:

.Bi {
  position:absolute;
  border:0;
  margin:0;
  top:0;
  bottom:0;
  width:100%;
  height:100%;
  -ms-user-select:none;
  -moz-user-select:none;
  -webkit-user-select:none;
  user-select:none;
}
.bi {
  position:absolute;
  border:0;
  margin:0;
  -ms-user-select:none;
  -moz-user-select:none;
  -webkit-user-select:none;
  user-select:none;
}

According to the standard, however, CSS should be case insensitive. Although browsers often treat class names as case-sensitive (because HTML attribute values are case sensitive), that is not always the case. For example, if the CSS is injected into the page via JavaScript the selectors (even those for class names) are treated as case insensitive.

In the specific example above, if the pdf2htmlEX output is rendered without CSS case sensitivity, the background image for figure 1 receives the properties of both the .Bi and the .bi classes, and is (incorrectly) absolutely positioned at the top of the container, as can be seen from the screen shot below:

screen shot 2013-10-21 at 3 40 14 pm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions