diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index ea5e556cd91..56ef73a2a45 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -12,6 +12,7 @@ @import "main/variables.scss"; @import "main/mixins.scss"; @import "main/fonts.scss"; +@import "main/layout.scss"; /** * Customized Twitter bootstrap @@ -27,19 +28,42 @@ /** * Generic css (forms, nav etc): */ -@import "generic.scss"; - - -/** - * Unrefactored css - */ -@import "common.scss"; - +@import "generic/avatar.scss"; +@import "generic/common.scss"; +@import "generic/typography.scss"; +@import "generic/buttons.scss"; +@import "generic/blocks.scss"; +@import "generic/ui_box.scss"; +@import "generic/issue_box.scss"; +@import "generic/files.scss"; +@import "generic/lists.scss"; +@import "generic/forms.scss"; +@import "generic/selects.scss"; /** * Page specific styles (issues, projects etc): */ -@import "sections.scss"; +@import "sections/header.scss"; +@import "sections/nav.scss"; +@import "sections/commits.scss"; +@import "sections/issues.scss"; +@import "sections/projects.scss"; +@import "sections/snippets.scss"; +@import "sections/votes.scss"; +@import "sections/merge_requests.scss"; +@import "sections/graph.scss"; +@import "sections/events.scss"; +@import "sections/themes.scss"; +@import "sections/tree.scss"; +@import "sections/notes.scss"; +@import "sections/profile.scss"; +@import "sections/login.scss"; +@import "sections/editor.scss"; +@import "sections/admin.scss"; +@import "sections/wiki.scss"; +@import "sections/wall.scss"; +@import "sections/dashboard.scss"; +@import "sections/stat_graph.scss"; /** * Code ighlight diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss deleted file mode 100644 index 2675c1545c6..00000000000 --- a/app/assets/stylesheets/common.scss +++ /dev/null @@ -1,392 +0,0 @@ -html { - overflow-y: scroll; -} - -/** LAYOUT **/ - -body { - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - margin-bottom: 20px; -} - -.container { - padding-top: 0; - z-index: 5; -} - -.container .content { - margin: 0 0; -} - -.author_link { - color: $link_color; -} - -.help li { color:$style_color; } - -.back-link { - font-size: 14px; -} - -table a code { - position: relative; - top: -2px; - margin-right: 3px; -} - -.loading { - margin: 20px auto; - background: url(ajax_loader.gif) no-repeat center center; - width: 40px; - height: 40px; - &.loading-gray { - background: url(ajax_loader_gray.gif) no-repeat center center; - } -} - -/** FLASH message **/ -.flash-container { - display: none; - cursor: pointer; - margin: 0; - text-align: center; - color: #fff; - font-size: 14px; - position: fixed; - bottom: 0; - width: 100%; - opacity: 0.8; - z-index: 100; - - .flash-notice { - background: #49C; - padding: 10px; - text-shadow: 0 1px 1px #178; - } - - .flash-alert { - background: #C67; - text-shadow: 0 1px 1px #945; - padding: 10px; - } -} - -span.update-author { - display: block; - color: #999; - font-weight: normal; - font-style: italic; - strong { - font-weight: bold; - font-style: normal; - } -} - -.user-mention { - color: #2FA0BB; - font-weight: bold; -} - -.field_with_errors { - display: inline; -} - -ul.breadcrumb { - background: white; - border: none; - li { - display: inline; - text-shadow: 0 1px 0 white - } - - a { - font-size: 16px; - } -} - -.line_holder { - &:hover { - td { - background: #FFFFCF !important; - } - } -} - -p.time { - color: #999; - font-size: 90%; - margin: 30px 3px 3px 2px; -} - -.highlight { - text-shadow: none; -} - -.highlight_word { - border-bottom: 2px solid #F90; -} - -.thin_area{ - height: 150px; -} - -// Fixes alignment on notes. -.new_note { - label { - text-align: left; - } -} - -// Fix issue with notes & lists creating a bunch of bottom borders. -li.note { - img { max-width:100% } - .note-title { - li { - border-bottom:none !important; - } - } -} - -.markdown { - img { - max-width: 100%; - } -} - -.wiki_content code, .readme code{ - background-color: inherit; -} - -.team_member_show { - td:first-child { - color: #aaa; - } -} - -.rss-icon { - img { - width: 24px; - vertical-align: top; - } - - strong { - line-height: 24px; - } -} - -.supp_diff_link, -.show-all-commits { - cursor: pointer; -} - -.merge-request, -.issue { - &.today{ - background: #EFE; - border-color: #CEC; - } - &.closed { - background: #F5f5f5; - border-color: #E5E5E5; - } - &.merged { - background: #F5f5f5; - border-color: #E5E5E5; - } -} - -.git_error_tips { - @extend .col-md-6; - text-align: left; - margin-top: 40px; - pre { - background: white; - border: none; - font-size: 12px; - } -} - -.error-message { - padding: 10px; - background: #C67; - margin: 0; - color: #FFF; - - a { - color: #fff; - text-decoration: underline; - } -} - -.no-ssh-key-message { - padding: 10px 0; - background: #C67; - margin: 0; - color: #FFF; - margin-top: -1px; - text-align: center; - - a { - color: #fff; - text-decoration: underline; - } -} - -.warning_message { - border-left: 4px solid #ed9; - color: #b90; - padding: 10px; - margin-bottom: 10px; - background: #ffffe6; - padding-left: 20px; - - &.centered { - text-align: center; - } -} - -.gitlab-promo { - a { - color: #aaa; - margin-right: 30px; - } -} - -pre { - &.clean { - background: none; - border: none; - margin: 0; - padding: 0; - } -} - -.milestone { - &.milestone-closed { - background: #eee; - } - .progress { - margin-bottom: 0; - margin-top: 4px; - } -} - -h1.http_status_code { - font-size: 56px; - line-height: 100px; - font-weight: normal; - color: #456; -} - -.control-group { - .controls { - span { - &.descr { - position: relative; - top: 2px; - left: 5px; - color: #666; - } - } - } -} - -img.emoji { - height: 20px; - vertical-align: middle; - width: 20px; -} - -.appear-data { - display: none; -} - -.chart { - overflow: hidden; - height: 220px; -} - -.navless-container { - margin-top: 20px; -} - -.description-block { - @extend .light-well; - @extend .light; - margin-bottom: 10px; -} - -table { - td.permission-x { - background: #D9EDF7 !important; - text-align: center; - } -} - -.dashboard-intro-icon { - float: left; - font-size: 32px; - color: #AAA; - padding: 5px 0; - width: 50px; - min-height: 100px; -} - -.broadcast-message { - padding: 10px; - text-align: center; - background: #555; - color: #BBB; -} - -.broadcast-message-preview { - @extend .broadcast-message; - margin-bottom: 20px; -} - -.ajax-users-select { - width: 400px; - - &.input-large { - width: 210px; - } - - &.input-clamp { - max-width: 100%; - } -} - -.user-result { - .user-image { - float: left; - } - .user-name { - } - .user-username { - color: #999; - } -} - -.namespace-result { - .namespace-kind { - color: #AAA; - font-weight: normal; - } - .namespace-path { - margin-left: 10px; - font-weight: bolder; - } -} - -.side-filters { - fieldset { - margin-bottom: 15px; - } -} - -.btn-sign-in { - margin-top: 7px; - text-shadow: none; -} - diff --git a/app/assets/stylesheets/generic.scss b/app/assets/stylesheets/generic.scss deleted file mode 100644 index 4c59358ced4..00000000000 --- a/app/assets/stylesheets/generic.scss +++ /dev/null @@ -1,12 +0,0 @@ -@import "generic/avatar.scss"; -@import "generic/nav.scss"; -@import "generic/common.scss"; -@import "generic/typography.scss"; -@import "generic/buttons.scss"; -@import "generic/blocks.scss"; -@import "generic/ui_box.scss"; -@import "generic/issue_box.scss"; -@import "generic/files.scss"; -@import "generic/lists.scss"; -@import "generic/forms.scss"; -@import "generic/selects.scss"; diff --git a/app/assets/stylesheets/generic/common.scss b/app/assets/stylesheets/generic/common.scss index ee3764c2c0e..4c1a1e9a68a 100644 --- a/app/assets/stylesheets/generic/common.scss +++ b/app/assets/stylesheets/generic/common.scss @@ -128,3 +128,360 @@ pre.well-pre { white-space: nowrap; max-width: 82%; } + +/** FLASH message **/ +.flash-container { + display: none; + cursor: pointer; + margin: 0; + text-align: center; + color: #fff; + font-size: 14px; + position: fixed; + bottom: 0; + width: 100%; + opacity: 0.8; + z-index: 100; + + .flash-notice { + background: #49C; + padding: 10px; + text-shadow: 0 1px 1px #178; + } + + .flash-alert { + background: #C67; + text-shadow: 0 1px 1px #945; + padding: 10px; + } +} +.author_link { + color: $link_color; +} + +.help li { color:$style_color; } + +.back-link { + font-size: 14px; +} + +table a code { + position: relative; + top: -2px; + margin-right: 3px; +} + +.loading { + margin: 20px auto; + background: url(ajax_loader.gif) no-repeat center center; + width: 40px; + height: 40px; + &.loading-gray { + background: url(ajax_loader_gray.gif) no-repeat center center; + } +} + +span.update-author { + display: block; + color: #999; + font-weight: normal; + font-style: italic; + strong { + font-weight: bold; + font-style: normal; + } +} + +.user-mention { + color: #2FA0BB; + font-weight: bold; +} + +.field_with_errors { + display: inline; +} + +.line_holder { + &:hover { + td { + background: #FFFFCF !important; + } + } +} + +p.time { + color: #999; + font-size: 90%; + margin: 30px 3px 3px 2px; +} + +.highlight { + text-shadow: none; +} + +.highlight_word { + border-bottom: 2px solid #F90; +} + +.thin_area{ + height: 150px; +} + +// Fixes alignment on notes. +.new_note { + label { + text-align: left; + } +} + +// Fix issue with notes & lists creating a bunch of bottom borders. +li.note { + img { max-width:100% } + .note-title { + li { + border-bottom:none !important; + } + } +} + +.markdown { + img { + max-width: 100%; + } +} + +.wiki_content code, .readme code{ + background-color: inherit; +} + +.team_member_show { + td:first-child { + color: #aaa; + } +} + +.rss-icon { + img { + width: 24px; + vertical-align: top; + } + + strong { + line-height: 24px; + } +} + +.supp_diff_link, +.show-all-commits { + cursor: pointer; +} + +.merge-request, +.issue { + &.today{ + background: #EFE; + border-color: #CEC; + } + &.closed { + background: #F5f5f5; + border-color: #E5E5E5; + } + &.merged { + background: #F5f5f5; + border-color: #E5E5E5; + } +} + +.git_error_tips { + @extend .col-md-6; + text-align: left; + margin-top: 40px; + pre { + background: white; + border: none; + font-size: 12px; + } +} + +.error-message { + padding: 10px; + background: #C67; + margin: 0; + color: #FFF; + + a { + color: #fff; + text-decoration: underline; + } +} + +.no-ssh-key-message { + padding: 10px 0; + background: #C67; + margin: 0; + color: #FFF; + margin-top: -1px; + text-align: center; + + a { + color: #fff; + text-decoration: underline; + } +} + +.warning_message { + border-left: 4px solid #ed9; + color: #b90; + padding: 10px; + margin-bottom: 10px; + background: #ffffe6; + padding-left: 20px; + + &.centered { + text-align: center; + } +} + +.gitlab-promo { + a { + color: #aaa; + margin-right: 30px; + } +} + +pre { + &.clean { + background: none; + border: none; + margin: 0; + padding: 0; + } +} + +.milestone { + &.milestone-closed { + background: #eee; + } + .progress { + margin-bottom: 0; + margin-top: 4px; + } +} + +h1.http_status_code { + font-size: 56px; + line-height: 100px; + font-weight: normal; + color: #456; +} + +.control-group { + .controls { + span { + &.descr { + position: relative; + top: 2px; + left: 5px; + color: #666; + } + } + } +} + +img.emoji { + height: 20px; + vertical-align: middle; + width: 20px; +} + +.appear-data { + display: none; +} + +.chart { + overflow: hidden; + height: 220px; +} + +.navless-container { + margin-top: 20px; +} + +.description-block { + @extend .light-well; + @extend .light; + margin-bottom: 10px; +} + +table { + td.permission-x { + background: #D9EDF7 !important; + text-align: center; + } +} + +.dashboard-intro-icon { + float: left; + font-size: 32px; + color: #AAA; + padding: 5px 0; + width: 50px; + min-height: 100px; +} + +.broadcast-message { + padding: 10px; + text-align: center; + background: #555; + color: #BBB; +} + +.broadcast-message-preview { + @extend .broadcast-message; + margin-bottom: 20px; +} + +.ajax-users-select { + width: 400px; + + &.input-large { + width: 210px; + } + + &.input-clamp { + max-width: 100%; + } +} + +.user-result { + .user-image { + float: left; + } + .user-name { + } + .user-username { + color: #999; + } +} + +.namespace-result { + .namespace-kind { + color: #AAA; + font-weight: normal; + } + .namespace-path { + margin-left: 10px; + font-weight: bolder; + } +} + +.side-filters { + fieldset { + margin-bottom: 15px; + } +} + +.btn-sign-in { + margin-top: 7px; + text-shadow: none; +} diff --git a/app/assets/stylesheets/generic/nav.scss b/app/assets/stylesheets/generic/nav.scss deleted file mode 100644 index 8d9fd4786a5..00000000000 --- a/app/assets/stylesheets/generic/nav.scss +++ /dev/null @@ -1,61 +0,0 @@ -/** - * nav-pills - * - */ -.nav-pills { - .active a { - background: $primary_color; - } - - &.nav-stacked { - > li > a { - @include border-radius(0); - border-left: 4px solid #EEE; - padding: 12px; - color: #777; - } - > .active > a { - border-color: $primary_color; - background: none; - color: #333; - font-weight: bolder; - - &:hover { - background: none; - color: #333; - } - } - - &.nav-stacked-menu { - li > a { - padding: 16px; - } - } - } - - &.nav-pills-small { - > li > a { - padding: 8px 12px; - font-size: 12px; - } - } -} - -.nav-pills > .active > a > i[class^="icon-"] { background: inherit; } - - - -/** - * nav-tabs - * - */ -.nav-tabs > li > a, .nav-pills > li > a { color: $style_color; } - -/** - * fix to keep tooltips position in top navigation bar - * - */ -.navbar .nav > li { - position: relative; - white-space: nowrap; -} diff --git a/app/assets/stylesheets/gl_bootstrap.scss b/app/assets/stylesheets/gl_bootstrap.scss index 44b76c7d834..1fdc82d36cf 100644 --- a/app/assets/stylesheets/gl_bootstrap.scss +++ b/app/assets/stylesheets/gl_bootstrap.scss @@ -1,3 +1,12 @@ +/* + * Twitter bootstrap with GitLab customizations/additions + * + * Some unused bootstrap compontents like panels are not included. + * Other components like tabs are modified to GitLab style. + * + */ + + // Core variables and mixins @import "bootstrap/variables"; @import "bootstrap/mixins"; @@ -128,6 +137,50 @@ } } +.nav-tabs > li > a, .nav-pills > li > a { color: $style_color; } + +// Nav pills +.nav-pills { + .active a { + background: $primary_color; + } + + &.nav-stacked { + > li > a { + @include border-radius(0); + border-left: 4px solid #EEE; + padding: 12px; + color: #777; + } + > .active > a { + border-color: $primary_color; + background: none; + color: #333; + font-weight: bolder; + + &:hover { + background: none; + color: #333; + } + } + + &.nav-stacked-menu { + li > a { + padding: 16px; + } + } + } + + &.nav-pills-small { + > li > a { + padding: 8px 12px; + font-size: 12px; + } + } +} + +.nav-pills > .active > a > i[class^="icon-"] { background: inherit; } + /* * Callouts from Bootstrap3 docs * @@ -172,3 +225,26 @@ border-color: #5cA64d; color: #3c763d; } + +// Breadcrumb +ul.breadcrumb { + background: white; + border: none; + li { + display: inline; + text-shadow: 0 1px 0 white + } + + a { + font-size: 16px; + } +} + +/** + * fix to keep tooltips position in top navigation bar + * + */ +.navbar .nav > li { + position: relative; + white-space: nowrap; +} diff --git a/app/assets/stylesheets/main/layout.scss b/app/assets/stylesheets/main/layout.scss new file mode 100644 index 00000000000..a4d889f26dd --- /dev/null +++ b/app/assets/stylesheets/main/layout.scss @@ -0,0 +1,18 @@ +html { + overflow-y: scroll; +} + +body { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + margin-bottom: 20px; +} + +.container { + padding-top: 0; + z-index: 5; +} + +.container .content { + margin: 0 0; +} diff --git a/app/assets/stylesheets/sections.scss b/app/assets/stylesheets/sections.scss deleted file mode 100644 index 52bb449eb93..00000000000 --- a/app/assets/stylesheets/sections.scss +++ /dev/null @@ -1,21 +0,0 @@ -@import "sections/header.scss"; -@import "sections/nav.scss"; -@import "sections/commits.scss"; -@import "sections/issues.scss"; -@import "sections/projects.scss"; -@import "sections/snippets.scss"; -@import "sections/votes.scss"; -@import "sections/merge_requests.scss"; -@import "sections/graph.scss"; -@import "sections/events.scss"; -@import "sections/themes.scss"; -@import "sections/tree.scss"; -@import "sections/notes.scss"; -@import "sections/profile.scss"; -@import "sections/login.scss"; -@import "sections/editor.scss"; -@import "sections/admin.scss"; -@import "sections/wiki.scss"; -@import "sections/wall.scss"; -@import "sections/dashboard.scss"; -@import "sections/stat_graph.scss";