title: Angularjs: How to *retrieve* css property from element in directive?
body: <p>I can set css properties on an element in a directive. But I cannot retrieve css properties on an element using the same method, it just returns an empty string.</p>
  
  <p>i.e:  var test = element.css("background-size"); //does not work!</p>
  
  <p>What am I doing wrong? See my link handler in my directive below:</p>
  
  <pre><code>link: function($scope, element, attrs) {
  
                          //debugger;
  
                          //handler for close button:
                          //its the first child within the parent element:
                          $scope.closeBtn = angular.element(element.children()[0]);
  
  
                          //save the background image so we can toggle its visibility:
                          $scope.backgroundImg = element.css("background","url(../../a0DK0000003XvBYMA0/assets/images/tabbed_panel_bkgd.png) no-repeat") ;//className:
                          element.css("background-position","0px 35px");
                          element.css("background-size", "924px 580px");
  
                          //above I was able to set css properties, but why can't I  retrieve css properties like this??:
                          var test = element.css("background-size");
  
                          $scope.closeBtn.bind('click',function(){
                              TweenLite.to(element, .75, {top:"635px",ease:Power2.easeOut,
                                  onComplete:function(){
                                      $scope.opened = false;
                                      $scope.closeBtn.css('opacity',0);
                                  }   });
                          })
                          //hander to raise tab panel:
                          element.bind('click', function() {
                              if(!$scope.opened){
                                  //debugger;
                                  $scope.closeBtn.css('opacity',1);
                                  TweenLite.to(element, .75, {top:"150px",ease:Power2.easeOut});
                                  $scope.opened = true;    
                              }
                          });
  
                      }
  </code></pre>