Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java	(revision 3887)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java	(revision 3888)
@@ -56,8 +56,6 @@
 
     private final Color inactiveColor;
-    private final Color textColor;
     private final Color selectedColor;
     private final Color relationSelectedColor;
-    private final Color areaTextColor;
     private final Color nodeColor;
     private final Color backgroundColor;
@@ -90,8 +88,6 @@
 
         this.inactiveColor = PaintColors.INACTIVE.get();
-        this.textColor = PaintColors.TEXT.get();
         this.selectedColor = PaintColors.SELECTED.get();
         this.relationSelectedColor = PaintColors.RELATIONSELECTED.get();
-        this.areaTextColor = PaintColors.AREA_TEXT.get();
         this.nodeColor = PaintColors.NODE.get();
         this.backgroundColor = PaintColors.BACKGROUND.get();
@@ -493,7 +489,7 @@
                     polygon.contains(centeredNBounds) // slow but nice
             ) {
-                g.setColor(areaTextColor);
+                g.setColor(text.color);
                 Font defaultFont = g.getFont();
-                g.setFont (orderFont);
+                g.setFont (text.font);
                 g.drawString (name,
                         (int)(centeredNBounds.getMinX() - nb.getMinX()),
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java	(revision 3887)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java	(revision 3888)
@@ -13,4 +13,5 @@
 import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
 import org.openstreetmap.josm.data.osm.visitor.paint.MapPainter;
+import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.IconReference;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
@@ -79,5 +80,5 @@
         String textPos = c.get("text-position", null, String.class);
         if (textPos == null || Utils.equal(textPos, "center")) {
-            text = TextElement.create(c);
+            text = TextElement.create(c, PaintColors.AREA_TEXT.get());
         }
         
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java	(revision 3887)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java	(revision 3888)
@@ -47,5 +47,5 @@
                 RelativeFloat width_rel = c.get(key, null, RelativeFloat.class, true);
                 if (width_rel != null)
-                    return relativeTo + width_rel.val;
+                    return relativeTo + 2*width_rel.val;
             }
         }
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java	(revision 3887)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java	(revision 3888)
@@ -53,5 +53,6 @@
         LineElemStyle casing =  createImpl(env, true);
         if (casing != null) {
-            casing.object_z_index = -1;
+            casing.z_index = -100;
+            casing.isModifier = true;
         }
         return casing;
@@ -179,5 +180,5 @@
             String textPos = c.get("text-position", null, String.class);
             if (textPos == null || equal(textPos, "line")) {
-                text = TextElement.create(c);
+                text = TextElement.create(c, PaintColors.TEXT.get());
             }
         }
@@ -192,6 +193,6 @@
         the way is tagged with a direction key
         (even if the tag is negated as in oneway=false) or the way is selected */
-        boolean showDirection = selected || ((!paintSettings.isUseRealWidth()) && (paintSettings.isShowDirectionArrow()
-                && (!paintSettings.isShowRelevantDirectionsOnly() || w.hasDirectionKeys())));
+        boolean showDirection = !isModifier && (selected || ((!paintSettings.isUseRealWidth()) && (paintSettings.isShowDirectionArrow()
+                && (!paintSettings.isShowRelevantDirectionsOnly() || w.hasDirectionKeys()))));
         boolean reversedDirection = w.reversedDirection();
         /* head only takes over control if the option is true,
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java	(revision 3887)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java	(revision 3888)
@@ -18,4 +18,5 @@
 import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
 import org.openstreetmap.josm.data.osm.visitor.paint.MapPainter;
+import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.IconReference;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
@@ -161,5 +162,5 @@
 
         NodeTextElement text = null;
-        TextElement te = TextElement.create(c);
+        TextElement te = TextElement.create(c, PaintColors.TEXT.get());
         if (te != null) {
             HorizontalTextAlignment hAlign = HorizontalTextAlignment.RIGHT;
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java	(revision 3887)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java	(revision 3888)
@@ -7,5 +7,4 @@
 import java.awt.Font;
 
-import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
 
@@ -27,5 +26,5 @@
     }
 
-    public static TextElement create(Cascade c) {
+    public static TextElement create(Cascade c, Color defTextColor) {
         String textStr = c.get("text", null, String.class);
         if (textStr == null)
@@ -53,7 +52,7 @@
         yOffset = c.get("text-offset-y", yOffset, Float.class);
         
-        Color color = c.get("text-color", PaintColors.TEXT.get(), Color.class);
+        Color color = c.get("text-color", defTextColor, Color.class);
         
-        return new TextElement(textKey, font, (int) xOffset, (int) yOffset, color);
+        return new TextElement(textKey, font, (int) xOffset, - (int) yOffset, color);
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 3887)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 3888)
@@ -43,5 +43,5 @@
         public boolean applies(Environment env) {
             String val = env.osm.get(k);
-            if (val == null)
+            if (val == null && op != Op.NEQ)
                 return false;
             switch (op) {
@@ -127,4 +127,8 @@
         @Override
         public boolean applies(Environment e) {
+            return not ^ appliesImpl(e);
+        }
+
+        public boolean appliesImpl(Environment e) {
             if (equal(id, "closed")) {
                 if (e.osm instanceof Way && ((Way) e.osm).isClosed())
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/parser/MapCSSParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/parser/MapCSSParser.java	(revision 3887)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/parser/MapCSSParser.java	(revision 3888)
@@ -283,4 +283,5 @@
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case LSQUARE:
+      case EXCLAMATION:
       case COLON:
         ;
@@ -294,4 +295,5 @@
         c = condition();
         break;
+      case EXCLAMATION:
       case COLON:
         c = pseudoclass();
@@ -516,5 +518,4 @@
     Token t;
     boolean not = false;
-    jj_consume_token(COLON);
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case EXCLAMATION:
@@ -526,4 +527,5 @@
       ;
     }
+    jj_consume_token(COLON);
     t = jj_consume_token(IDENT);
       {if (true) return new Condition.PseudoClassCondition(t.image, not);}
@@ -1026,9 +1028,4 @@
   }
 
-  private boolean jj_3R_29() {
-    if (jj_3R_45()) return true;
-    return false;
-  }
-
   private boolean jj_3R_17() {
     if (jj_scan_token(IDENT)) return true;
@@ -1043,4 +1040,9 @@
   }
 
+  private boolean jj_3R_29() {
+    if (jj_3R_45()) return true;
+    return false;
+  }
+
   private boolean jj_3R_24() {
     Token xsp;
@@ -1117,9 +1119,4 @@
   }
 
-  private boolean jj_3R_39() {
-    if (jj_scan_token(LESS)) return true;
-    return false;
-  }
-
   private boolean jj_3R_62() {
     if (jj_scan_token(PIPE)) return true;
@@ -1131,6 +1128,6 @@
   }
 
-  private boolean jj_3R_38() {
-    if (jj_scan_token(LESS_EQUAL)) return true;
+  private boolean jj_3R_39() {
+    if (jj_scan_token(LESS)) return true;
     return false;
   }
@@ -1145,4 +1142,17 @@
   }
 
+  private boolean jj_3R_38() {
+    if (jj_scan_token(LESS_EQUAL)) return true;
+    return false;
+  }
+
+  private boolean jj_3R_60() {
+    if (jj_scan_token(LESS)) return true;
+    if (jj_3R_15()) return true;
+    if (jj_3R_43()) return true;
+    if (jj_3R_15()) return true;
+    return false;
+  }
+
   private boolean jj_3R_37() {
     if (jj_scan_token(GREATER)) return true;
@@ -1155,6 +1165,9 @@
   }
 
-  private boolean jj_3R_60() {
-    if (jj_scan_token(LESS)) return true;
+  private boolean jj_3R_59() {
+    if (jj_scan_token(EQUAL)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(22)) jj_scanpos = xsp;
     if (jj_3R_15()) return true;
     if (jj_3R_43()) return true;
@@ -1165,15 +1178,4 @@
   private boolean jj_3R_36() {
     if (jj_scan_token(GREATER_EQUAL)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_59() {
-    if (jj_scan_token(EQUAL)) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(22)) jj_scanpos = xsp;
-    if (jj_3R_15()) return true;
-    if (jj_3R_43()) return true;
-    if (jj_3R_15()) return true;
     return false;
   }
@@ -1202,22 +1204,22 @@
   }
 
+  private boolean jj_3R_69() {
+    if (jj_scan_token(SLASH)) return true;
+    if (jj_3R_15()) return true;
+    if (jj_3R_43()) return true;
+    if (jj_3R_15()) return true;
+    return false;
+  }
+
+  private boolean jj_3R_56() {
+    if (jj_scan_token(GREATER_EQUAL)) return true;
+    if (jj_3R_15()) return true;
+    if (jj_3R_43()) return true;
+    if (jj_3R_15()) return true;
+    return false;
+  }
+
   private boolean jj_3R_47() {
     if (jj_3R_19()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_69() {
-    if (jj_scan_token(SLASH)) return true;
-    if (jj_3R_15()) return true;
-    if (jj_3R_43()) return true;
-    if (jj_3R_15()) return true;
-    return false;
-  }
-
-  private boolean jj_3R_56() {
-    if (jj_scan_token(GREATER_EQUAL)) return true;
-    if (jj_3R_15()) return true;
-    if (jj_3R_43()) return true;
-    if (jj_3R_15()) return true;
     return false;
   }
@@ -1425,4 +1427,13 @@
   }
 
+  private boolean jj_3R_27() {
+    if (jj_3R_43()) return true;
+    if (jj_3R_15()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_44()) jj_scanpos = xsp;
+    return false;
+  }
+
   private boolean jj_3R_20() {
     Token xsp;
@@ -1447,13 +1458,4 @@
   }
 
-  private boolean jj_3R_27() {
-    if (jj_3R_43()) return true;
-    if (jj_3R_15()) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_44()) jj_scanpos = xsp;
-    return false;
-  }
-
   private boolean jj_3R_26() {
     if (jj_scan_token(MINUS)) return true;
@@ -1482,4 +1484,28 @@
   }
 
+  private boolean jj_3R_16() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_25()) {
+    jj_scanpos = xsp;
+    if (jj_3R_26()) {
+    jj_scanpos = xsp;
+    if (jj_3R_27()) return true;
+    }
+    }
+    return false;
+  }
+
+  private boolean jj_3_4() {
+    if (jj_3R_16()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(27)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(13)) return true;
+    }
+    return false;
+  }
+
   private boolean jj_3R_13() {
     if (jj_3R_19()) return true;
@@ -1489,28 +1515,4 @@
     jj_scanpos = xsp;
     if (jj_3R_21()) return true;
-    }
-    return false;
-  }
-
-  private boolean jj_3R_16() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_25()) {
-    jj_scanpos = xsp;
-    if (jj_3R_26()) {
-    jj_scanpos = xsp;
-    if (jj_3R_27()) return true;
-    }
-    }
-    return false;
-  }
-
-  private boolean jj_3_4() {
-    if (jj_3R_16()) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_scan_token(27)) {
-    jj_scanpos = xsp;
-    if (jj_scan_token(13)) return true;
     }
     return false;
@@ -1604,17 +1606,17 @@
   }
 
+  private boolean jj_3R_70() {
+    if (jj_3R_16()) return true;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_75()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
   private boolean jj_3_2() {
     if (jj_3R_13()) return true;
     if (jj_scan_token(RSQUARE)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_70() {
-    if (jj_3R_16()) return true;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_75()) { jj_scanpos = xsp; break; }
-    }
     return false;
   }
@@ -1651,5 +1653,5 @@
    }
    private static void jj_la1_init_0() {
-      jj_la1_0 = new int[] {0xc,0xc,0x12,0x200,0x200,0x200,0x10000000,0x402,0x10000000,0x402,0x40000000,0x2004000,0x2004000,0x4000000,0x4,0x0,0x4,0x8081011e,0x800000,0x1000012,0x1c00400,0x3c0000,0x1fc0400,0x800000,0x402,0x2,0x8002000,0x8002000,0x80000000,0x400,0x0,0x800,0x400000,0xa07c0c00,0xa07c0c00,0x8081011e,0x8001011e,0x10000000,0x8081011e,0x8000011e,};
+      jj_la1_0 = new int[] {0xc,0xc,0x12,0x200,0x200,0x200,0x10000000,0x402,0x10000000,0x402,0x40000000,0x2804000,0x2804000,0x4000000,0x4,0x0,0x4,0x8081011e,0x800000,0x1000012,0x1c00400,0x3c0000,0x1fc0400,0x800000,0x402,0x2,0x8002000,0x8002000,0x80000000,0x400,0x0,0x800,0x400000,0xa07c0c00,0xa07c0c00,0x8081011e,0x8001011e,0x10000000,0x8081011e,0x8000011e,};
    }
    private static void jj_la1_init_1() {
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/parser/MapCSSParser.jj
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/parser/MapCSSParser.jj	(revision 3887)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/parser/MapCSSParser.jj	(revision 3888)
@@ -349,6 +349,7 @@
 }
 {
+    ( <EXCLAMATION> { not = true; } )? 
     <COLON>
-    ( <EXCLAMATION> { not = true; } )? t=<IDENT>
+    t=<IDENT>
     { return new Condition.PseudoClassCondition(t.image, not); }
 }
