pineconellc/angular-foundation — pull request #117 by nervetattoo (2014-09-23 08:24:51+00:00)
Title: Enable modifying head based stylesheets

WIP.

Some changes I'm looking into requires creating and modifying `head` based `style` tags because foundation uses **:before** and **:after** pseudo selectors.
This module is a start in that direction. I'm pushing it before its done so the API can be discussed.
Currently I'm looking into fixing the `dropdownToggle`'s *pip* positioning relative to the initiating element.

I'm looking to create an API that is lightweight and familiar, so this is my first draft:

```js
function(stylesheetFactory) {
// Create a new stylesheet that is auto-appended to

var sheet = stylesheetFactory();
// Or load an existing
var sheet = stylesheetFactory(angular.element(document.querySelector('style#id'));

sheet.css('foobar:before', {
'background-color': 'green',
color: 'red'
});

// Get the element
var $elem = sheet.element();
}
```

Currently calling `css` will also auto-sync to the DOM, but this should probably be explicit so multiple redraws arent triggered.