Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 18663)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 18664)
@@ -217,4 +217,5 @@
         FACTORY_MAP.put("parent_tag", Factory.ofEnv(String.class, Functions::parent_tag));
         FACTORY_MAP.put("parent_tags", Factory.ofEnv(String.class, Functions::parent_tags));
+        FACTORY_MAP.put("parent_way_angle", Factory.ofEnv(Functions::parent_way_angle));
         FACTORY_MAP.put("plus", Factory.ofNumberVarArgs(0.0, DoubleUnaryOperator.identity(), Functions::plus));
         FACTORY_MAP.put("print", Factory.of(Object.class, Functions::print));
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.java	(revision 18663)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.java	(revision 18664)
@@ -42,4 +42,5 @@
 import org.openstreetmap.josm.tools.Territories;
 import org.openstreetmap.josm.tools.Utils;
+import org.openstreetmap.josm.tools.RotationAngle.WayDirectionRotationAngle;
 
 /**
@@ -479,4 +480,22 @@
 
     /**
+     * Get the rotation angle of the preceding parent way segment at the node location.
+     * If there is no preceding parent way segment, the following way segment is used instead.
+     * Requires a parent way object matched via
+     * <a href="https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation#LinkSelector">child selector</a>.
+     * 
+     * @param env the environment
+     * @return the rotation angle of the parent way segment at the node in radians,
+     * otherwise null if there is no matching parent way or the object is not a node
+     * @since 18664
+     */
+    public static Double parent_way_angle(final Environment env) {
+        if (env.osm instanceof Node && env.parent instanceof Way) {
+            return WayDirectionRotationAngle.getRotationAngleForNodeOnWay((Node) env.osm, (Way) env.parent);
+        }
+        return null;
+    }
+
+    /**
      * Gets the value of the key {@code key} from the object's child.
      * @param env the environment
