tc39 / tc39/ecmarkup

Flag to disable dark mode

Open
#647 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
245
Forks
80
Avg merge
10h 46m
Merged PRs (30d)
2

Description

#632 introduced dark mode. While I personally use dark mode at the OS level, I do not want dark mode on a ECMA standard. IMO, it does not look professional or authoritative.

I would like a way to disable dark mode, perhaps with a flag passed to ecmarkup. The only way I have found to revert the dark mode is to redefine the CSS variables.

This excerpt simply forces the original (light) color scheme for dark mode. But really, users should not have to do this.

@supports (color-scheme: dark) {
    @media (prefers-color-scheme: dark) {
      :root {
        --foreground-color: #111;
        --background-color: #fff;

        --link-foreground-color: #206ca7;
        --link-hover-foreground-color: #239dee;

        --user-code-foreground-color: brown;

        --var-foreground-color: #218379;

        --referenced0-background-color: #ffff6c;
        --referenced1-background-color: #ffa4a8;
        --referenced2-background-color: #96e885;
        --referenced3-background-color: #3eeed2;
        --referenced4-background-color: #eacfb6;
        --referenced5-background-color: #82ddff;
        --referenced6-background-color: #ffbcf2;

        --note-background-color: #e9fbe9;
        --note-border-color: #52e052;
        --note-editor-border-color: #faa;

        --nt-link-foreground-color: #333;

        --production-rhs-background-color: #f0f0f0;
        --production-rhs-border-color: #888;

        --params-foreground-color: #2aa198;
        --opt-foreground-color: #b58900;

        --title-foreground-color: #f60;

        --caption-foreground-color: #555555;

        --table-header-background-color: #eeeeee;

        --highlight-background-color-start: rgba(249, 241, 172, 1);
        --highlight-background-color-end: rgba(249, 241, 172, 0);

        --highlight-background-color: rgba(249, 241, 172, 1);

        --ins-background-color: #e0f8e0;
        --ins-border-color: #396;

        --del-background-color: #fee;

        --control-foreground-color: #eee;
        --control-dimmed-foreground-color: #666;
        --control-background-color: #ddd;
        --control-dark-background-color: #ccc;
        --control-border-color: #aaa;
        --control-light-border-color: #bbb;
        --control-shortcut-background-color: #eee;
        --control-shortcut-shadow-color: #ccc;
        --control-dialog-fade-color: rgba(255, 255, 255, 0.6);

        --control-link-foreground-color: #1567a2;

        --control-input-background-color: #bbb;
        --control-input-border-color: #999;

        --menu-header-background-color: #bbb;
        --menu-revealed-link-foreground-color: #206ca7;
        --menu-unpin-hover-foreground-color: #bb1212;

        --menu-trace-list-foreground-color: #999;
        --menu-trace-list-background-color: #222;

        --toolbox-tail-background-outside-color: rgba(0, 0, 0, 0);
        --toolbox-tail-border-outside-color: rgba(204, 204, 204, 0);

        --normative-optional-background-color: #ffeedd;
        --normative-optional-border-color: #ff6600;

        --attributes-tag-foreground-color: #884400;

        --figure-background: #fff;
      }
    }
  }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how ecmarkup emits dark-mode CSS and accepts options passed to the tool. Define the flag's expected behavior for generated documents, then verify that enabling it preserves the light color scheme without requiring users to override CSS variables.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.