tc39 / tc39/ecmarkup

Support costom note types

Open
#636 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

In ECMA-426, we have more types of "notes" than the two supported by ecmarkup. For example, in http://tc39.es/ecma426/#sec-linking-inline you can see an "Example" and an "Issue".

We currently make them work by using <emu-note example>/<emu-note issue> with some custom CSS, but we have to inject the "Example"/"Issue" title through CSS so it's not user-selectable.

It'd be great if Ecmarkup:

  1. allowed custom values for emu-note's type attribute, and used it to generate the label and to maintain the counter, type="editor" would be special-cased to have "editor's note" rather than just "editor" as the label
  2. the various colors were customizable through CSS variables, so that we could simply do
    emu-note[type=example] {
      --note-text-color: #574b0f;
      --note-border-color: #e0cb52;
      --note-background-color: #fcfaee;
    }
    

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

Review ecmarkup's current emu-note handling and compare it with ECMA-426's spec.emu lines 26–55, which demonstrate the existing CSS workaround. Done means custom note types produce selectable labels and counters, editor notes use the requested special label, and note colors can be set through CSS variables.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.