Skip to content

Center tables within markdown #5141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

ollien
Copy link

@ollien ollien commented Oct 22, 2018

This fixes tables not being centered in markdown files, as described by #4916.

Before:
Before

After:
After

I tried to avoid using !important, but Semantic seems to place a text-align: inherit on tables, so I had to (sadly) resort to using it.

Signed-off-by: Nick Krichevsky <[email protected]>
@lunny lunny added the topic/ui Change the appearance of the Gitea UI label Oct 23, 2018
@lafriks
Copy link
Member

lafriks commented Oct 25, 2018

I don't think this is the desired solution always

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 25, 2018
@lafriks lafriks added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Oct 25, 2018
@ollien
Copy link
Author

ollien commented Oct 25, 2018

Could you elaborate? It seems consistent with GitHub's markdown, which is what the original issue proposed.

@lafriks
Copy link
Member

lafriks commented Oct 30, 2018

Current proposed solution would center also tables that should not be centered.

Example

| 参数 | 类型 | 说明 | 是否必填 |
| :----: | :----: | :----: | :----: |
| code | string | 机构编码  | 是 |

Should be centered and look like this:

参数 类型 说明 是否必填
code string 机构编码

While standard tables should not be centered. Example:

| 参数 | 类型 | 说明 | 是否必填 |
| ---- | ---- | ---- | ---- |
| code | string | 机构编码  | 是 |
参数 类型 说明 是否必填
code string 机构编码

Copy link
Member

@lafriks lafriks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break standard table layout

@ollien
Copy link
Author

ollien commented Oct 30, 2018

Got it. Did not realize there was a difference.

@techknowlogick
Copy link
Member

Closing per @lafriks comment.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. topic/ui Change the appearance of the Gitea UI type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants