Commit 9587506124f2a36f9b844da2c9fe17a26fe1daa9
1 parent
550c1828
Exists in
master
and in
4 other branches
Dont override default table with bootstrap class. Refactor table css
Showing
7 changed files
with
31 additions
and
96 deletions
Show diff stats
app/assets/stylesheets/gitlab_bootstrap.scss
| ... | ... | @@ -62,6 +62,5 @@ $baseLineHeight: 18px !default; |
| 62 | 62 | @import "gitlab_bootstrap/buttons.scss"; |
| 63 | 63 | @import "gitlab_bootstrap/blocks.scss"; |
| 64 | 64 | @import "gitlab_bootstrap/files.scss"; |
| 65 | -@import "gitlab_bootstrap/tables.scss"; | |
| 66 | 65 | @import "gitlab_bootstrap/lists.scss"; |
| 67 | 66 | @import "gitlab_bootstrap/forms.scss"; | ... | ... |
app/assets/stylesheets/gitlab_bootstrap/files.scss
app/assets/stylesheets/gitlab_bootstrap/mixins.scss
app/assets/stylesheets/gitlab_bootstrap/tables.scss
| ... | ... | @@ -1,68 +0,0 @@ |
| 1 | -table { | |
| 2 | - @extend .table; | |
| 3 | - @extend .table-striped; | |
| 4 | - border: 1px solid #CCC; | |
| 5 | - width: 100%; | |
| 6 | - | |
| 7 | - &.low { | |
| 8 | - td { | |
| 9 | - line-height: 18px; | |
| 10 | - } | |
| 11 | - } | |
| 12 | - | |
| 13 | - &.headless { | |
| 14 | - tr:first-child td{ | |
| 15 | - border-top: 1px solid #CCC; | |
| 16 | - } | |
| 17 | - } | |
| 18 | - | |
| 19 | - th { | |
| 20 | - font-weight: normal; | |
| 21 | - font-size: 15px; | |
| 22 | - vertical-align: middle; | |
| 23 | - border-bottom: 1px solid #CCC; | |
| 24 | - text-shadow: 0 1px 1px #fff; | |
| 25 | - | |
| 26 | - ul.nav { | |
| 27 | - text-shadow: none; | |
| 28 | - margin: 0; | |
| 29 | - } | |
| 30 | - } | |
| 31 | - | |
| 32 | - th, td { | |
| 33 | - padding: 10px; | |
| 34 | - line-height: 18px; | |
| 35 | - text-align: left; | |
| 36 | - } | |
| 37 | - | |
| 38 | - td { | |
| 39 | - border-color: #f1f1f1; | |
| 40 | - line-height: 28px; | |
| 41 | - | |
| 42 | - .s16 { | |
| 43 | - margin-top: 5px; | |
| 44 | - margin-right: 5px; | |
| 45 | - } | |
| 46 | - | |
| 47 | - &:first-child { | |
| 48 | - border-left: 1px solid #CCC; | |
| 49 | - } | |
| 50 | - | |
| 51 | - &:last-child { | |
| 52 | - border-right: 1px solid #CCC; | |
| 53 | - } | |
| 54 | - } | |
| 55 | - | |
| 56 | - &.bordered { | |
| 57 | - @extend .table-bordered; | |
| 58 | - } | |
| 59 | - | |
| 60 | - &.lite { | |
| 61 | - border: none; | |
| 62 | - box-shadow: none; | |
| 63 | - tr, td { | |
| 64 | - border: none; | |
| 65 | - background:none !important; | |
| 66 | - } | |
| 67 | - } | |
| 68 | -} |
app/assets/stylesheets/sections/tree.scss
| ... | ... | @@ -13,13 +13,21 @@ |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | .tree-table { |
| 16 | + @extend .table; | |
| 16 | 17 | @include border-radius(0); |
| 17 | - .tree-item { | |
| 18 | - td { | |
| 18 | + | |
| 19 | + tr { | |
| 20 | + td, th { | |
| 19 | 21 | padding: 8px 10px; |
| 20 | - strong { | |
| 21 | - font-weight: normal; | |
| 22 | - } | |
| 22 | + line-height: 20px; | |
| 23 | + } | |
| 24 | + th { | |
| 25 | + font-weight: normal; | |
| 26 | + font-size: 15px; | |
| 27 | + border-bottom: 1px solid #CCC; | |
| 28 | + } | |
| 29 | + td { | |
| 30 | + border-color: #F1F1F1; | |
| 23 | 31 | } |
| 24 | 32 | &:hover { |
| 25 | 33 | td { |
| ... | ... | @@ -29,12 +37,11 @@ |
| 29 | 37 | } |
| 30 | 38 | cursor: pointer; |
| 31 | 39 | } |
| 32 | - | |
| 33 | 40 | &.selected { |
| 34 | 41 | td { |
| 35 | - background: $hover; | |
| 36 | - border-top: 1px solid #ADF; | |
| 37 | - border-bottom: 1px solid #ADF; | |
| 42 | + background: #f5f5f5; | |
| 43 | + border-top: 1px solid #EEE; | |
| 44 | + border-bottom: 1px solid #EEE; | |
| 38 | 45 | } |
| 39 | 46 | } |
| 40 | 47 | } |
| ... | ... | @@ -56,21 +63,6 @@ |
| 56 | 63 | } |
| 57 | 64 | } |
| 58 | 65 | |
| 59 | - .tree-table { | |
| 60 | - border: none; | |
| 61 | - | |
| 62 | - th .btn { | |
| 63 | - margin: -2px -1px; | |
| 64 | - padding: 2px 10px; | |
| 65 | - } | |
| 66 | - td { | |
| 67 | - line-height: 20px; | |
| 68 | - background: #fff; | |
| 69 | - border-left: none; | |
| 70 | - border-right: none; | |
| 71 | - } | |
| 72 | - } | |
| 73 | - | |
| 74 | 66 | .tree_author { |
| 75 | 67 | padding-right: 8px; |
| 76 | 68 | |
| ... | ... | @@ -125,4 +117,4 @@ |
| 125 | 117 | .tree-ref-holder { |
| 126 | 118 | float: left; |
| 127 | 119 | margin-top: 5px; |
| 128 | -} | |
| 129 | 120 | \ No newline at end of file |
| 121 | +} | ... | ... |
app/views/projects/tree/_tree.html.haml
| ... | ... | @@ -26,7 +26,7 @@ |
| 26 | 26 | = link_to @commit.short_id, project_commit_path(@project, @commit) |
| 27 | 27 | – |
| 28 | 28 | = truncate(@commit.title, length: 50) |
| 29 | - %th= link_to "history", project_commits_path(@project, @id), class: "btn btn-tiny pull-right" | |
| 29 | + %th= link_to "history", project_commits_path(@project, @id), class: "pull-right" | |
| 30 | 30 | |
| 31 | 31 | - if tree.up_dir? |
| 32 | 32 | %tr.tree-item | ... | ... |
app/views/projects/tree/_tree_item.html.haml
| 1 | 1 | %tr{ class: "tree-item #{tree_hex_class(tree_item)}" } |
| 2 | 2 | %td.tree-item-file-name |
| 3 | 3 | = tree_icon(type) |
| 4 | - %strong= link_to truncate(tree_item.name, length: 40), project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name)) | |
| 4 | + %span= link_to truncate(tree_item.name, length: 40), project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name)) | |
| 5 | 5 | %td.tree_time_ago.cgray |
| 6 | 6 | %span.log_loading.hide |
| 7 | 7 | Loading commit data... | ... | ... |