Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use padding instead of margin, including for headers

Mir Bhatia6530d6868dfb
diff --git a/app/components/op_primer/border_box_table_component.html.erb b/app/components/op_primer/border_box_table_component.html.erb
index 276661e4343..4c96232aa95 100644
--- a/app/components/op_primer/border_box_table_component.html.erb
+++ b/app/components/op_primer/border_box_table_component.html.erb
@@ -34,14 +34,15 @@ See COPYRIGHT and LICENSE files for more details.
test_selector:,
)) do |component|
component.with_header(classes: grid_class, color: :muted) do
- concat render(Primer::Beta::Text.new(classes: "op-border-box-grid--mobile-heading",
- font_weight: :semibold)) { mobile_title }
headers.each do |name, args|
concat render(Primer::Beta::Text.new(classes: header_classes(name),
font_weight: :semibold,
**header_args(name))) { args[:caption] }
end
+ concat render(Primer::Beta::Text.new(classes: "op-border-box-grid--mobile-heading",
+ font_weight: :semibold)) { mobile_title }
+
if has_actions?
concat render(Primer::BaseComponent.new(classes: heading_class,
tag: :div))
diff --git a/app/components/op_primer/border_box_table_component.sass b/app/components/op_primer/border_box_table_component.sass
index d6b3dac8155..34902845700 100644
--- a/app/components/op_primer/border_box_table_component.sass
+++ b/app/components/op_primer/border_box_table_component.sass
@@ -15,12 +15,13 @@
justify-content: flex-start
align-items: center
+ &--heading,
&--row-item
&:not(:first-child)
- margin-left: 6px
+ padding-left: 6px
&:not(:last-child)
- margin-right: 6px
+ padding-right: 6px
&--mobile-heading,
&--row-label