Commit e7267817 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch '331445-move-version-icon-to-css' into 'master'

Move versions icon to CSS

See merge request gitlab-org/gitlab!65843
parents 23c45929 90331b94
......@@ -509,6 +509,24 @@ span.idiff {
}
}
.version-link {
@include gl-display-inline-block;
@include gl-align-self-center;
@include gl-mt-2;
@include gl-w-5;
@include gl-h-5;
@include gl-float-left;
background-color: $gray-400;
mask-image: asset_url('icons-stacked.svg#doc-versions');
mask-repeat: no-repeat;
mask-size: cover;
mask-position: center;
&:hover {
background-color: $black;
}
}
//
// IMPORTANT PERFORMANCE OPTIMIZATION BELOW
//
......
......@@ -66,17 +66,14 @@ module Gitlab
link_to project_blame_path(project, tree_join(previous_commit_id, path)),
title: _('View blame prior to this change'),
aria: { label: _('View blame prior to this change') },
class: 'version-link',
data: { toggle: 'tooltip', placement: 'right', container: 'body' } do
versions_sprite_icon
' '.html_safe
end
end
def project_duration
@project_duration ||= age_map_duration(groups, project)
end
def versions_sprite_icon
@versions_sprite_icon ||= sprite_icon('doc-versions', css_class: 'doc-versions align-text-bottom')
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment