axr / specification

This is where we work on the specification for AXR
spec.axrproject.org
13 stars 0 forks source link

aliasing a simple selector #82

Closed Mouvedia closed 11 years ago

Mouvedia commented 11 years ago

functionality: having the properties set on another element being set on the current element(s) as if it was that element.

root {
  elementA {
    background: black;
    #alias @this as elementB;
    //which is equivalent to
    #alias as elementB;
  }
  elementB {
    alignX: right;
    etc.
  }
}

//which is equivalent to

@container test {
  #alias @this as elementB;
}
root {
  elementA {
    background: black;
    //this transfers all the properties set on elementB to elementA
    isA: test;
  }
  elementB {
    alignX: right;
    etc.
  }
}

alternative

#mirror sel(elementB);
Mouvedia commented 11 years ago
root {
  .. elementA {
      #aka elementB;
  }
  elementB { }
  elementB:filter { }
  elementC {
      elementB { }
  }
}