StylishThemes / GitHub-Dark

:octocat: Dark GitHub style
https://raw.githubusercontent.com/StylishThemes/GitHub-Dark/master/github-dark.user.css
BSD 2-Clause "Simplified" License
9.65k stars 653 forks source link

Broken Usercss #867

Closed Mottie closed 5 years ago

Mottie commented 5 years ago

Edit: The actual problem was the default font size setting


I pushed a new release today and broke usercss installation/updating. The problem is the syntax highlighting selectors immediately before the github syntax theme placeholder:

  /* inline code - big blocks */
.markdown-format pre,
.markdown-body pre,
.markdown-format .highlight pre,
.markdown-body .highlight pre,
#facebox pre,
.blob-expanded,
.terminal,
.copyable-terminal,
#notebook .input_area,
.blob-code-context,
.markdown-format code,
.api pre,
.api code,
.hook-delivery-details pre,
.hook-delivery-container pre;

The only solution I've been able to come up with (so far) is to replace that block with another placeholder

  /* inline code - big blocks */
/*[[syntax-prefix]]*/

then add the following block to the usercss metadata:

@advanced dropdown syntax-prefix "" {
  1 "Read Only" <<<EOT
  .markdown-format pre, .markdown-body pre, .markdown-format .highlight pre,
  .markdown-body .highlight pre, #facebox pre, .blob-expanded, .terminal,
  .copyable-terminal, #notebook .input_area, .blob-code-context,
  .markdown-format code, .api pre, .api code, .hook-delivery-details pre,
  .hook-delivery-container pre,
  EOT;
} 

It works, but it makes the usercss options menu ugly and would break the style for users that install github-dark.css directly.

silverwind commented 5 years ago

Hmm, I would probably just duplicate the whole block into all github themes and add a comment that any change done on this block needs to be done on all github themes as well.

Mottie commented 5 years ago

The problem was actually the default e.g. 10px that was made as the default for code font size.

The period must have been messing up the parser.

Mottie commented 5 years ago

See https://github.com/openstyles/usercss-meta/issues/68

the-j0k3r commented 5 years ago

Some reply in https://github.com/StylishThemes/GitHub-Dark/commit/7a7bb3a505519b275779c09da404263575792516