From 4d37b24614413e4f3e31d08296753fd07ec4bcad Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas Lopez Date: Mon, 28 Nov 2016 15:42:38 -0600 Subject: Fixed file template dropdown for the "New File" editor for smaller/zoomed screens --- app/assets/stylesheets/pages/editor.scss | 51 +++++++++++++++++++++- .../file-template-dropwdown-proper-position.yml | 4 ++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 changelogs/unreleased/file-template-dropwdown-proper-position.yml diff --git a/app/assets/stylesheets/pages/editor.scss b/app/assets/stylesheets/pages/editor.scss index 778126bcfb7..935f157b33d 100644 --- a/app/assets/stylesheets/pages/editor.scss +++ b/app/assets/stylesheets/pages/editor.scss @@ -51,8 +51,16 @@ .new-file-name { display: inline-block; - width: 450px; + max-width: 450px; float: left; + + @media(max-width: $screen-md-max) { + width: 280px; + } + + @media(max-width: $screen-sm-max) { + width: 180px; + } } .file-buttons { @@ -114,3 +122,44 @@ } } } + +@media(max-width: $screen-xs-max){ + .file-editor { + .file-title { + .pull-right { + height: auto; + } + } + + .new-file-name { + margin-bottom: 0; + max-width: none; + width: 100%; + } + + .file-buttons { + display: flex; + flex-direction: column; + width: 100%; + margin-bottom: 7px; + + .soft-wrap-toggle { + margin: 7px 0 0; + } + + .encoding-selector, + .license-selector, + .gitignore-selector, + .gitlab-ci-yml-selector { + margin: 7px 0 0; + + button { + width: 100%; + } + } + + } + + } + +} diff --git a/changelogs/unreleased/file-template-dropwdown-proper-position.yml b/changelogs/unreleased/file-template-dropwdown-proper-position.yml new file mode 100644 index 00000000000..cf2a622b7e6 --- /dev/null +++ b/changelogs/unreleased/file-template-dropwdown-proper-position.yml @@ -0,0 +1,4 @@ +--- +title: Fixed file template dropdown for the "New File" editor for smaller/zoomed screens +merge_request: +author: -- cgit v1.2.1 From 7f9d1ad378e9d00dce8882231e8476faf7067f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Iv=C3=A1n=20Vargas=20L=C3=B3pez?= Date: Wed, 14 Dec 2016 09:44:04 -0600 Subject: Fixed the use of display:flex to display:block --- app/assets/stylesheets/pages/editor.scss | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/pages/editor.scss b/app/assets/stylesheets/pages/editor.scss index 935f157b33d..fea9a6b5009 100644 --- a/app/assets/stylesheets/pages/editor.scss +++ b/app/assets/stylesheets/pages/editor.scss @@ -132,26 +132,25 @@ } .new-file-name { - margin-bottom: 0; max-width: none; width: 100%; } .file-buttons { - display: flex; - flex-direction: column; + display: block; width: 100%; - margin-bottom: 7px; .soft-wrap-toggle { - margin: 7px 0 0; + width: 100%; + margin: 7px 0; } .encoding-selector, .license-selector, .gitignore-selector, .gitlab-ci-yml-selector { - margin: 7px 0 0; + display: block; + margin: 7px 0; button { width: 100%; -- cgit v1.2.1 From e63f796ae4c89f3e51eb0e9977add0fe408c1b9e Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray Date: Thu, 15 Dec 2016 08:57:48 -0600 Subject: Unify margin widths --- app/assets/stylesheets/pages/editor.scss | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/pages/editor.scss b/app/assets/stylesheets/pages/editor.scss index fea9a6b5009..38d5df9e106 100644 --- a/app/assets/stylesheets/pages/editor.scss +++ b/app/assets/stylesheets/pages/editor.scss @@ -134,15 +134,17 @@ .new-file-name { max-width: none; width: 100%; + margin-bottom: 3px; } .file-buttons { display: block; width: 100%; + margin-bottom: 10px; .soft-wrap-toggle { width: 100%; - margin: 7px 0; + margin: 3px 0; } .encoding-selector, @@ -150,15 +152,12 @@ .gitignore-selector, .gitlab-ci-yml-selector { display: block; - margin: 7px 0; + margin: 3px 0; button { width: 100%; } } - } - } - } -- cgit v1.2.1