Skip to content

Commit

Permalink
Update style for merge commits (#1121)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Mar 6, 2018
1 parent 9356e51 commit 8946a2c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -120,7 +120,7 @@ GitHub Enterprise is also supported. More info in the options.

- [Makes file headers sticky underneath the pull request header](https://user-images.githubusercontent.com/81981/28682784-78bac340-72fe-11e7-9386-bdbab7703693.gif)
- [Shows user's full name in comments](https://cloud.githubusercontent.com/assets/170270/16172068/0a67b98c-3580-11e6-92f0-6fc930ee17d1.png)
- [Differentiates merge commits from regular commits](https://cloud.githubusercontent.com/assets/170270/14101222/2fe2c24a-f5bd-11e5-8b1f-4e589917d4c4.png)
- [Differentiates merge commits from regular commits](https://user-images.githubusercontent.com/1402241/36772362-8ddf8138-1c87-11e8-9f34-1f6b76e5499f.png)
- [Adds labels to comments by the original poster](https://cloud.githubusercontent.com/assets/4331946/25075520/d62fbbd0-2316-11e7-921f-ab736dc3522e.png)
- [Adds build status and link to CI by the repo's title](https://user-images.githubusercontent.com/1402241/32562120-d65166e4-c4e8-11e7-90fb-cbaf36e2709f.png)
- [Color-codes and counts reviews in PRs list](https://user-images.githubusercontent.com/1402241/33474535-a814ee78-d6ad-11e7-8f08-a8b72799e376.png)
Expand Down
18 changes: 3 additions & 15 deletions source/content.css
Expand Up @@ -297,25 +297,13 @@ followed someone
}

/* Fade out merge commits from commit list */
.refined-github-merge-commit .commit-title {
margin-top: 4px !important;
font-size: 12px !important;
}

.refined-github-merge-commit .commit-author-section {
font-size: 11.4px !important;
.refined-github-merge-commit .table-list-cell:first-child {
opacity: 0.7;
}

.refined-github-merge-commit .octicon-git-pull-request {
width: 27px;
height: 36px;
margin-left: 9px;
color: #4078c0;
}

.refined-github-merge-commit .avatar-child {
width: 16px !important;
height: 16px !important;
width: 20px;
}

/* Move new button to the right on single commit page */
Expand Down
4 changes: 2 additions & 2 deletions source/features/mark-merge-commits-in-list.js
Expand Up @@ -5,8 +5,8 @@ export default function () {
for (const commit of select.all('.commits-list-item:not(.refined-github-merge-commit)')) {
if (select.exists('[title^="Merge pull request"]', commit)) {
commit.classList.add('refined-github-merge-commit');
commit.querySelector('.commit-avatar-cell').prepend(icons.mergedPullRequest());
commit.querySelector('.avatar').classList.add('avatar-child');
const icon = icons.mergedPullRequest();
select('.commit-title', commit).prepend(icon);
}
}
}
2 changes: 1 addition & 1 deletion source/libs/icons.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8946a2c

Please sign in to comment.