Skip to content

GFM table alignment #1499

@jablko

Description

@jablko

Issue

#1222 left-aligned tables #1221 (comment), which looks good but overrides GFM table alignment.

e.g. in #1490 I centered some of the columns https://github.com/microsoft/TypeScript-Website/pull/1490/files#diff-5df78592bbddd75ac689061920fbaee892b7755b8d637d160150981fdfce22aaR299

The rendered td and th elements do have align="center" attributes https://www.typescriptlang.org/docs/handbook/type-compatibility.html#any-unknown-object-void-undefined-null-and-never-assignability

but the .markdown table td rule is more specific:
Screenshot from 2021-01-14 17-11-42

Recommended Fix

Maybe :not([align]) to markdown.scss?

td:not([align]),
th:not([align]) {
  text-align: left;
}

->

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions