Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CSSMediaRule.js 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //.CommonJS
  2. var CSSOM = {
  3. CSSRule: require("./CSSRule").CSSRule,
  4. CSSGroupingRule: require("./CSSGroupingRule").CSSGroupingRule,
  5. CSSConditionRule: require("./CSSConditionRule").CSSConditionRule,
  6. MediaList: require("./MediaList").MediaList
  7. };
  8. ///CommonJS
  9. /**
  10. * @constructor
  11. * @see http://dev.w3.org/csswg/cssom/#cssmediarule
  12. * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule
  13. */
  14. CSSOM.CSSMediaRule = function CSSMediaRule() {
  15. CSSOM.CSSConditionRule.call(this);
  16. this.media = new CSSOM.MediaList();
  17. };
  18. CSSOM.CSSMediaRule.prototype = new CSSOM.CSSConditionRule();
  19. CSSOM.CSSMediaRule.prototype.constructor = CSSOM.CSSMediaRule;
  20. CSSOM.CSSMediaRule.prototype.type = 4;
  21. // https://opensource.apple.com/source/WebCore/WebCore-7611.1.21.161.3/css/CSSMediaRule.cpp
  22. Object.defineProperties(CSSOM.CSSMediaRule.prototype, {
  23. "conditionText": {
  24. get: function() {
  25. return this.media.mediaText;
  26. },
  27. set: function(value) {
  28. this.media.mediaText = value;
  29. },
  30. configurable: true,
  31. enumerable: true
  32. },
  33. "cssText": {
  34. get: function() {
  35. var cssTexts = [];
  36. for (var i=0, length=this.cssRules.length; i < length; i++) {
  37. cssTexts.push(this.cssRules[i].cssText);
  38. }
  39. return "@media " + this.media.mediaText + " {" + cssTexts.join("") + "}";
  40. },
  41. configurable: true,
  42. enumerable: true
  43. }
  44. });
  45. //.CommonJS
  46. exports.CSSMediaRule = CSSOM.CSSMediaRule;
  47. ///CommonJS