2023-08-17 09:47:40 +00:00
|
|
|
let Value = require('../value')
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2023-08-17 09:47:40 +00:00
|
|
|
class DisplayGrid extends Value {
|
|
|
|
constructor(name, prefixes) {
|
|
|
|
super(name, prefixes)
|
2022-01-21 08:28:41 +00:00
|
|
|
if (name === 'display-grid') {
|
2023-08-17 09:47:40 +00:00
|
|
|
this.name = 'grid'
|
2022-01-21 08:28:41 +00:00
|
|
|
}
|
|
|
|
}
|
2023-08-17 09:47:40 +00:00
|
|
|
|
2022-01-21 08:28:41 +00:00
|
|
|
/**
|
|
|
|
* Faster check for flex value
|
|
|
|
*/
|
2023-08-17 09:47:40 +00:00
|
|
|
check(decl) {
|
|
|
|
return decl.prop === 'display' && decl.value === this.name
|
|
|
|
}
|
|
|
|
}
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2023-08-17 09:47:40 +00:00
|
|
|
DisplayGrid.names = ['display-grid', 'inline-grid']
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2023-08-17 09:47:40 +00:00
|
|
|
module.exports = DisplayGrid
|