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

UI: Fix wrapping long code lines #5927

Merged
merged 2 commits into from
Feb 2, 2019
Merged

Conversation

silverwind
Copy link
Member

Wrapping was initially added in #2789 but it is currently disabled because the rule that applies wrapping to the wrap class did not have enough CSS specificity.

Resolved the issue by using a general selector that matches all code boxes. The previous wrap class was removed because it had only been inconsistenly applied to various code boxes and because I found no easy way to add classes to code boxes rendered in Markdown.

Also removed a seemingly useless :before on code view and added padding to restore the spacing.

Before

screenshot 2019-02-01 at 21 38 37

screenshot 2019-02-01 at 21 39 01

After

screenshot 2019-02-01 at 21 44 56

screenshot 2019-02-01 at 21 39 18

Wrapping was initially added in go-gitea#2789
but it is currently disabled because the rule that applies wrapping to
the wrap class did not have enough CSS specificity.

Resolved the issue by using a general selector that matches all code
boxes. The previous wrap class was removed because it had only been
inconsistenly applied to various code boxes and because I found no easy
way to add classes to code boxes rendered in Markdown.

Also removed a seemingly useless :before on code view and added padding
to restore the spacing.
@codecov-io
Copy link

codecov-io commented Feb 1, 2019

Codecov Report

Merging #5927 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5927   +/-   ##
=======================================
  Coverage   37.97%   37.97%           
=======================================
  Files         329      329           
  Lines       48406    48406           
=======================================
  Hits        18383    18383           
  Misses      27381    27381           
  Partials     2642     2642

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af22df8...05d8081. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 1, 2019
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 1, 2019
@techknowlogick techknowlogick added the topic/ui Change the appearance of the Gitea UI label Feb 2, 2019
@techknowlogick techknowlogick added this to the 1.8.0 milestone Feb 2, 2019
@silverwind silverwind changed the title Fix wrapping long code lines in UI UI: Fix wrapping long code lines Feb 2, 2019
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 2, 2019
@zeripath zeripath merged commit 12ee544 into go-gitea:master Feb 2, 2019
@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/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants