display-grid.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. (function() {
  2. var DisplayGrid, OldValue, Value, flexSpec,
  3. extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  4. hasProp = {}.hasOwnProperty;
  5. flexSpec = require('./flex-spec');
  6. OldValue = require('../old-value');
  7. Value = require('../value');
  8. DisplayGrid = (function(superClass) {
  9. extend(DisplayGrid, superClass);
  10. DisplayGrid.names = ['display-grid', 'inline-grid'];
  11. function DisplayGrid(name, prefixes) {
  12. DisplayGrid.__super__.constructor.apply(this, arguments);
  13. if (name === 'display-grid') {
  14. this.name = 'grid';
  15. }
  16. }
  17. DisplayGrid.prototype.check = function(decl) {
  18. return decl.prop === 'display' && decl.value === this.name;
  19. };
  20. return DisplayGrid;
  21. })(Value);
  22. module.exports = DisplayGrid;
  23. }).call(this);