title: Retrieve css values in Angular JS directives
body: <p>I am a Angular JS newbie and I try to write some encapsulated directives to style button groups. I have an " restrict: 'A' " directive in which I need to retrieve the parent's padding to get the usable with within. I also try to avoid JQuery. 
  Angular JS looks pretty neat and I don't want to mess up this feeling.
  Briefly my link function contains the following:</p>
  
  <pre><code>parentScope = element.parent().scope();
  parentScope.$watch(parentHeight = element.parent()[0].css("padding"), function(newValue, oldValue, scope){
     var parentHeight = element.parent()[0].offsetWidth,
     parentPadding = newValue;
  }
  </code></pre>
  
  <p>I keep getting an undefined error.
  What is the proper way to access css values in directives?</p>