Skip to content

Commit

Permalink
Add overline style (#67)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
Yash-Singh1 and sindresorhus committed Jan 22, 2021
1 parent 13605f8 commit 80dcce2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ declare namespace ansiStyles {
*/
readonly underline: CSPair;

/**
Make text overline.
Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash.
*/
readonly overline: CSPair;

/**
Inverse background and foreground colors.
*/
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function assembleStyles() {
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
overline: [53, 55],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
Expand Down
1 change: 1 addition & 0 deletions index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ expectType<ansiStyles.CSPair>(ansiStyles.modifier.italic);
expectType<ansiStyles.CSPair>(ansiStyles.modifier.reset);
expectType<ansiStyles.CSPair>(ansiStyles.modifier.strikethrough);
expectType<ansiStyles.CSPair>(ansiStyles.modifier.underline);
expectType<ansiStyles.CSPair>(ansiStyles.modifier.overline);

// -- Top level --
// --- Foreground color ---
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Each style has an `open` and `close` property.
- `dim`
- `italic` *(Not widely supported)*
- `underline`
- `overline` *Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash.*
- `inverse`
- `hidden`
- `strikethrough` *(Not widely supported)*
Expand Down

0 comments on commit 80dcce2

Please sign in to comment.