Even though dynamics contexts have no staffs, we treat them as "in staff"
material because they are in the core of the vertical axis group.
This classification prevents potential problems of having nothing considered
on the inside of these vertical axis groups.
--- /dev/null
+\version "2.17.15"
+
+\header {
+ texidoc = "@code{DynamicText}, @code{DynamicLineSpanner}, and
+@code{Hairpin} do not have @code{outside-staff-priority} in @code{Dynamics}
+contexts. This allows grobs with @code{outside-staff-priority} set
+to be positioned above and below them.
+"
+}
+
+<<
+ \new Staff = "Test" {
+ \tempo "Andante" c'1
+ }
+ \new Dynamics \with { alignAboveContext = "Test" } {
+ s1\f
+ }
+>>
(padding . 0.5))
\override TextScript.font-shape = #'italic
\override DynamicLineSpanner.Y-offset = #0
+ \override DynamicLineSpanner.outside-staff-priority = ##f
+ \override DynamicText.outside-staff-priority = ##f
+ \override Hairpin.outside-staff-priority = ##f
\override DynamicText.X-offset =
#(ly:make-simple-closure
`(,+