main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
583 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | exports.addon = function (renderer) {
|
---|
| 4 | if (process.env.NODE_ENV !== 'production') {
|
---|
| 5 | require('./__dev__/warnOnMissingDependencies')('spread', renderer, ['put']);
|
---|
| 6 | }
|
---|
| 7 |
|
---|
| 8 | renderer.spread = function (css, block) {
|
---|
| 9 | block = block || renderer.hash(css);
|
---|
| 10 | block = renderer.pfx + block;
|
---|
| 11 | renderer.put('.' + block + ',[data-' + block + ']', css);
|
---|
| 12 |
|
---|
| 13 | var spread = {
|
---|
| 14 | toString: function () {
|
---|
| 15 | return ' ' + block;
|
---|
| 16 | }
|
---|
| 17 | };
|
---|
| 18 |
|
---|
| 19 | spread['data-' + block] = '';
|
---|
| 20 |
|
---|
| 21 | return spread;
|
---|
| 22 | };
|
---|
| 23 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.