Actions
Defect #42818
closedUnnecessary margin below icons on the board-style projects page
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
In the projects page (board), when using alert syntax or code blocks in the project descriptions, an unwanted margin appears below the alert icons or the copy button of the code blocks.This margin is originally intended for the my-project and bookmarked icons, so I'll explicitly apply styles only to those elements to resolve this.
Since wrapping the sprite_icon inside a <span> tag is already implemented in the projects page (list), I think it's a good idea to do the same here for consistency. https://github.com/redmine/redmine/blob/200eced4692ba0ec3cd1df8e1d6b19ba06c419a3/app/helpers/projects_queries_helper.rb#L27-L28
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index e35e5cba0..deea6c903 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -922,7 +922,7 @@ ul.projects div.description ul li {list-style-type:initial;}
background-image: none;
padding-left: 0;
}
-#projects-index ul.projects div.root svg {
+#projects-index ul.projects div.root .icon-bookmarked-project svg, #projects-index ul.projects div.root .my-project svg {
stroke-width: 2;
margin-bottom: 10px;
}
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 01a5452f7..bae1c4e3a 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -80,8 +80,8 @@ module ProjectsHelper
classes += %w(icon icon-bookmarked-project) if bookmarked_project_ids.include?(project.id)
s = link_to_project(project, {}, :class => classes.uniq.join(' '))
- s << sprite_icon('user', l(:label_my_projects), icon_only: true) if User.current.member_of?(project)
- s << sprite_icon('bookmarked', l(:label_my_bookmarks), icon_only: true) if bookmarked_project_ids.include?(project.id)
+ s << tag.span(sprite_icon('user', l(:label_my_projects), icon_only: true), class: 'icon-only icon-user my-project') if User.current.member_of?(project)
+ s << tag.span(sprite_icon('bookmarked', l(:label_my_bookmarks), icon_only: true), class: 'icon-only icon-bookmarked-project') if bookmarked_project_ids.include?(project.id)
if project.description.present?
s << content_tag('div', textilizable(project.short_description, :project => project), :class => 'wiki description')
end
before change | after change |
![]() |
![]() |
Files
Related issues
Actions