Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
2bb2544e
Commit
2bb2544e
authored
Jan 18, 2017
by
Filipa Lacerda
Committed by
Annabel Dunstone Gray
Jan 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use flexbox instead of media queries
Move CSS to correct file
parent
28b4407b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
74 deletions
+36
-74
app/assets/stylesheets/framework/files.scss
app/assets/stylesheets/framework/files.scss
+34
-0
app/assets/stylesheets/pages/diff.scss
app/assets/stylesheets/pages/diff.scss
+0
-72
app/views/projects/diffs/_file.html.haml
app/views/projects/diffs/_file.html.haml
+2
-2
No files found.
app/assets/stylesheets/framework/files.scss
View file @
2bb2544e
...
...
@@ -231,3 +231,37 @@ span.idiff {
}
}
}
.file-title-flex-parent
{
display
:
flex
;
align-items
:
center
;
background-color
:
$gray-light
;
border-bottom
:
1px
solid
$border-color
;
padding
:
10px
$gl-padding
;
margin
:
0
;
border-radius
:
3px
3px
0
0
;
>
a
{
flex
:
1
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
color
:
$gl-text-color
;
}
small
{
margin
:
0
10px
0
0
;
}
.file-actions-fixed
{
white-space
:
nowrap
;
.btn
{
padding
:
0
10px
;
font-size
:
13px
;
line-height
:
28px
;
display
:
inline-block
;
}
}
}
app/assets/stylesheets/pages/diff.scss
View file @
2bb2544e
...
...
@@ -48,15 +48,6 @@
.diff-toggle-caret
{
padding-right
:
6px
;
}
.file-title-name
{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
inline-block
;
vertical-align
:
bottom
;
max-width
:
450px
;
}
}
.diff-content
{
...
...
@@ -493,66 +484,3 @@
}
}
}
/**
* Diff file title
*/
.file-holder
[
data-view
=
"parallel"
]
.file-title-name
,
.file-holder
[
data-view
=
"inline"
]
.file-title-name
{
@media
(
max-width
:
$screen-xs
)
{
max-width
:
140px
;
}
@media
(
min-width
:
$screen-xs
)
and
(
max-width
:
$screen-xs-max
)
{
max-width
:
250px
;
}
@media
(
min-width
:
$screen-sm
)
and
(
max-width
:
$screen-sm-max
)
{
max-width
:
250px
;
}
@media
(
min-width
:
$screen-md
)
and
(
max-width
:
$screen-md-max
)
{
max-width
:
480px
;
}
}
.file-holder
[
data-view
=
"parallel"
]
.file-title-name
{
@media
(
min-width
:
$screen-lg
)
{
max-width
:
760px
;
}
}
.file-holder
[
data-view
=
"inline"
]
.file-title-name
{
@media
(
min-width
:
$screen-lg
)
{
max-width
:
530px
;
}
}
.right-sidebar-expanded
{
.file-holder
[
data-view
=
"parallel"
]
.file-title-name
,
.file-holder
[
data-view
=
"inline"
]
.file-title-name
{
@media
(
min-width
:
$screen-sm
)
and
(
max-width
:
$screen-sm-max
)
{
max-width
:
250px
;
}
@media
(
min-width
:
$screen-md
)
and
(
max-width
:
$screen-md-max
)
{
max-width
:
250px
;
}
@media
(
min-width
:
$screen-lg
)
{
max-width
:
460px
;
}
}
.file-holder
[
data-view
=
"parallel"
]
.file-title-name
{
@media
(
min-width
:
$screen-xs
)
and
(
max-width
:
$screen-xs-max
)
{
max-width
:
180px
;
}
}
.file-holder
[
data-view
=
"inline"
]
.file-title-name
{
@media
(
min-width
:
$screen-xs
)
and
(
max-width
:
$screen-xs-max
)
{
max-width
:
100px
;
}
}
}
app/views/projects/diffs/_file.html.haml
View file @
2bb2544e
.diff-file.file-holder
{
id:
file_hash
,
data:
diff_file_html_data
(
project
,
diff_file
.
file_path
,
diff_commit
.
id
)
}
.file-title
.file-title
-flex-parent
=
render
"projects/diffs/file_header"
,
diff_file:
diff_file
,
blob:
blob
,
diff_commit:
diff_commit
,
project:
project
,
url:
"#
#{
file_hash
}
"
-
unless
diff_file
.
submodule?
.file-actions.hidden-xs
.file-actions
-fixed
.hidden-xs
-
if
blob_text_viewable?
(
blob
)
=
link_to
'#'
,
class:
'js-toggle-diff-comments btn active has-tooltip btn-file-option'
,
title:
"Toggle comments for this file"
,
disabled:
@diff_notes_disabled
do
=
icon
(
'comment'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment