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

If there is any padding set for the inset box, then ignore the default one

Behrokh Satarnejadec0025d8b1e3
diff --git a/app/components/op_primer/inset_box.html.erb b/app/components/op_primer/inset_box.html.erb
index 9c7bd227299..34782cf798c 100644
--- a/app/components/op_primer/inset_box.html.erb
+++ b/app/components/op_primer/inset_box.html.erb
@@ -28,13 +28,19 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<%=
+ args = system_arguments.dup
+
+ # Only set default padding if no padding keys are given
+ unless args.key?(:p) || args.key?(:pt) || args.key?(:pb) || args.key?(:pl) || args.key?(:pr)
+ args[:p] = 3
+ end
+
render(
Primer::Box.new(
border:,
border_radius: 2,
bg: :inset,
- p: 3,
- **system_arguments
+ **args
)
) do
content