From e25b1107c8cec0b2bfd362dcd5cb6a5cbff90e49 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 18 Mar 2015 20:46:26 -0700 Subject: Refactor select css. Make selects same width --- app/assets/stylesheets/generic/selects.scss | 48 ++---------------------- app/assets/stylesheets/pages/groups.scss | 1 - app/assets/stylesheets/pages/issues.scss | 35 ++++++++--------- app/assets/stylesheets/pages/merge_requests.scss | 4 ++ app/assets/stylesheets/pages/tree.scss | 2 +- 5 files changed, 26 insertions(+), 64 deletions(-) (limited to 'app/assets/stylesheets') diff --git a/app/assets/stylesheets/generic/selects.scss b/app/assets/stylesheets/generic/selects.scss index c13a685a528..7557f411111 100644 --- a/app/assets/stylesheets/generic/selects.scss +++ b/app/assets/stylesheets/generic/selects.scss @@ -46,55 +46,13 @@ } } -select { - &.select2 { - width: 100px; - } - - &.select2-sm { - width: 100px; - } -} - -@media (min-width: $screen-sm-min) { - select { - &.select2 { - width: 150px; - } - &.select2-sm { - width: 120px; - } - } +.select2-container { + width: 100% !important; } -/* Medium devices (desktops, 992px and up) */ -@media (min-width: $screen-md-min) { - select { - &.select2 { - width: 170px; - } - &.select2-sm { - width: 140px; - } - } -} - -/* Large devices (large desktops, 1200px and up) */ -@media (min-width: $screen-lg-min) { - select { - &.select2 { - width: 200px; - } - &.select2-sm { - width: 150px; - } - } -} - - /** Branch/tag selector **/ .project-refs-form .select2-container { - margin-right: 10px; + width: 160px !important; } .ajax-users-dropdown, .ajax-project-users-dropdown { diff --git a/app/assets/stylesheets/pages/groups.scss b/app/assets/stylesheets/pages/groups.scss index e49fe1a9dd6..2b1b747139a 100644 --- a/app/assets/stylesheets/pages/groups.scss +++ b/app/assets/stylesheets/pages/groups.scss @@ -1,6 +1,5 @@ .new-group-member-holder { margin-top: 50px; - background: #f9f9f9; padding-top: 20px; } diff --git a/app/assets/stylesheets/pages/issues.scss b/app/assets/stylesheets/pages/issues.scss index 4ea34cc1dac..6c1dd4f7e9f 100644 --- a/app/assets/stylesheets/pages/issues.scss +++ b/app/assets/stylesheets/pages/issues.scss @@ -59,33 +59,34 @@ } } -@media (min-width: 800px) { .issues_filters select { width: 160px; } } -@media (min-width: 1200px) { .issues_filters select { width: 220px; } } +@media (min-width: 800px) { + .issues_bulk_update { + select, .select2-container { + width: 120px !important; + display: inline-block; + } + } +} -@media (min-width: 800px) { .issues_bulk_update .select2-container { min-width: 120px; } } -@media (min-width: 1200px) { .issues_bulk_update .select2-container { min-width: 160px; } } +@media (min-width: 1200px) { + .issues_bulk_update { + select, .select2-container { + width: 160px !important; + display: inline-block; + } + } +} .issues_bulk_update { .select2-container .select2-choice { color: #444 !important; - font-weight: 500; } } -#update_status { - width: 100px; -} - .participants { margin-bottom: 20px; } -.issues_bulk_update { - .select2-container { - text-shadow: none; - } -} - .issue-search-form { margin: 0; height: 24px; @@ -177,6 +178,6 @@ h2.issue-title { font-weight: bold; } -.context .select2-container { - width: 100% !important; +.issue-form .select2-container { + width: 250px !important; } diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index fe5667a587f..394b59b7e4b 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -194,3 +194,7 @@ } } } + +.merge-request-form .select2-container { + width: 250px !important; +} diff --git a/app/assets/stylesheets/pages/tree.scss b/app/assets/stylesheets/pages/tree.scss index b0e6a05fa06..57f63b52aa1 100644 --- a/app/assets/stylesheets/pages/tree.scss +++ b/app/assets/stylesheets/pages/tree.scss @@ -112,7 +112,7 @@ .tree-ref-holder { float: left; - margin-right: 6px; + margin-right: 15px; .select2-container .select2-choice, .select2-container.select2-drop-above .select2-choice { padding: 4px 12px; -- cgit v1.2.3