display-grid.js 409 B

123456789101112131415161718192021
  1. let Value = require('../value')
  2. class DisplayGrid extends Value {
  3. constructor(name, prefixes) {
  4. super(name, prefixes)
  5. if (name === 'display-grid') {
  6. this.name = 'grid'
  7. }
  8. }
  9. /**
  10. * Faster check for flex value
  11. */
  12. check(decl) {
  13. return decl.prop === 'display' && decl.value === this.name
  14. }
  15. }
  16. DisplayGrid.names = ['display-grid', 'inline-grid']
  17. module.exports = DisplayGrid