mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix sticky diff stats container (#12002)
* Fix sticky diff stats container * Use pure CSS sticky instead of Fomantic's JS * add border color to arc-green * add slight padding on sides * make linter happy Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							fc2f2c7602
						
					
				
				
					commit
					daf62841f6
				
			@@ -1204,8 +1204,6 @@ function initPullRequestReview() {
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  $('.diff-detail-box.ui.sticky').sticky();
 | 
			
		||||
 | 
			
		||||
  $('.btn-review').on('click', function (e) {
 | 
			
		||||
    e.preventDefault();
 | 
			
		||||
    $(this).closest('.dropdown').find('.menu').toggle('visible');
 | 
			
		||||
@@ -2042,7 +2040,6 @@ function initCodeView() {
 | 
			
		||||
    $.get(`${$blob.data('url')}?${$blob.data('query')}&anchor=${$blob.data('anchor')}`, (blob) => {
 | 
			
		||||
      $row.replaceWith(blob);
 | 
			
		||||
      $(`[data-anchor="${$blob.data('anchor')}"]`).on('click', (e) => { insertBlobExcerpt(e) });
 | 
			
		||||
      $('.diff-detail-box.ui.sticky').sticky();
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
  $('.ui.blob-excerpt').on('click', (e) => { insertBlobExcerpt(e) });
 | 
			
		||||
 
 | 
			
		||||
@@ -1567,6 +1567,16 @@
 | 
			
		||||
        background: #ffffff;
 | 
			
		||||
        line-height: 30px;
 | 
			
		||||
 | 
			
		||||
        &.sticky {
 | 
			
		||||
            position: sticky;
 | 
			
		||||
            top: 0;
 | 
			
		||||
            z-index: 800;
 | 
			
		||||
            margin-bottom: 10px;
 | 
			
		||||
            border-bottom: 1px solid #d4d4d5;
 | 
			
		||||
            padding-left: 5px;
 | 
			
		||||
            padding-right: 5px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        > div:after {
 | 
			
		||||
            clear: both;
 | 
			
		||||
            content: "";
 | 
			
		||||
 
 | 
			
		||||
@@ -1335,6 +1335,10 @@ a.ui.labels .label:hover {
 | 
			
		||||
    .detail-files {
 | 
			
		||||
        background-color: inherit;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    &.sticky {
 | 
			
		||||
        border-bottom-color: rgba(255, 255, 255, .1);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.comment-code-cloud {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user