source: frontend/node_modules/cssom/lib/CSSHostRule.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 913 bytes
RevLine 
[9af201e]1//.CommonJS
2var CSSOM = {
3 CSSRule: require("./CSSRule").CSSRule
4};
5///CommonJS
6
7
8/**
9 * @constructor
10 * @see http://www.w3.org/TR/shadow-dom/#host-at-rule
11 */
12CSSOM.CSSHostRule = function CSSHostRule() {
13 CSSOM.CSSRule.call(this);
14 this.cssRules = [];
15};
16
17CSSOM.CSSHostRule.prototype = new CSSOM.CSSRule();
18CSSOM.CSSHostRule.prototype.constructor = CSSOM.CSSHostRule;
19CSSOM.CSSHostRule.prototype.type = 1001;
20//FIXME
21//CSSOM.CSSHostRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;
22//CSSOM.CSSHostRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;
23
24Object.defineProperty(CSSOM.CSSHostRule.prototype, "cssText", {
25 get: function() {
26 var cssTexts = [];
27 for (var i=0, length=this.cssRules.length; i < length; i++) {
28 cssTexts.push(this.cssRules[i].cssText);
29 }
30 return "@host {" + cssTexts.join("") + "}";
31 }
32});
33
34
35//.CommonJS
36exports.CSSHostRule = CSSOM.CSSHostRule;
37///CommonJS
Note: See TracBrowser for help on using the repository browser.