Skip to content
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

readd .markdown class to all markup renderers #8357

Merged
merged 3 commits into from
Oct 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ footer .ui.left,footer .ui.right{line-height:40px}
.repository.file.list .non-diff-file-content .view-raw img{padding:5px 5px 0 5px}
.repository.file.list .non-diff-file-content .plain-text{padding:1em 2em 1em 2em}
.repository.file.list .non-diff-file-content .plain-text pre{word-break:break-word;white-space:pre-wrap}
.repository.file.list .non-diff-file-content .csv{overflow-x:auto}
.repository.file.list .non-diff-file-content .csv{overflow-x:auto;padding:0!important}
Copy link
Member

Choose a reason for hiding this comment

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

This change seems extra. Why is it needed ?

Copy link
Member Author

Choose a reason for hiding this comment

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

As the .markdown class is now added for CSV files, we want to reset the padding, restoring the old behaviour of .csv class only. This is only needed for CSV, as this class was introduced with the same PR that removed the .markdown class

Copy link
Member

Choose a reason for hiding this comment

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

Ok it feel that we should introduce a new common class containing markdown style except padding and let only markdown specific inside .markdown but this would be good enough.

.repository.file.list .non-diff-file-content pre{overflow:auto}
.repository.file.list .sidebar{padding-left:0}
.repository.file.list .sidebar .octicon{width:16px}
Expand Down
1 change: 1 addition & 0 deletions public/less/_repository.less
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@

.csv {
overflow-x: auto;
padding: 0 !important;
}

pre {
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/view_file.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</div>
</h4>
<div class="ui attached table unstackable segment">
<div class="file-view {{if .IsMarkup}}{{.MarkupType}}{{else if .IsRenderedHTML}}plain-text{{else if .IsTextFile}}code-view{{end}} has-emoji">
<div class="file-view {{if .IsMarkup}}{{.MarkupType}} markdown{{else if .IsRenderedHTML}}plain-text{{else if .IsTextFile}}code-view{{end}} has-emoji">
{{if .IsMarkup}}
{{if .FileContent}}{{.FileContent | Safe}}{{end}}
{{else if .IsRenderedHTML}}
Expand Down