Standardize settings file naming and relocate documentation files Fix code quality violations from rsx:check Reorganize user_management directory into logical subdirectories Move Quill Bundle to core and align with Tom Select pattern Simplify Site Settings page to focus on core site information Complete Phase 5: Multi-tenant authentication with login flow and site selection Add route query parameter rule and synchronize filename validation logic Fix critical bug in UpdateNpmCommand causing missing JavaScript stubs Implement filename convention rule and resolve VS Code auto-rename conflict Implement js-sanitizer RPC server to eliminate 900+ Node.js process spawns Implement RPC server architecture for JavaScript parsing WIP: Add RPC server infrastructure for JS parsing (partial implementation) Update jqhtml terminology from destroy to stop, fix datagrid DOM preservation Add JQHTML-CLASS-01 rule and fix redundant class names Improve code quality rules and resolve violations Remove legacy fatal error format in favor of unified 'fatal' error type Filter internal keys from window.rsxapp output Update button styling and comprehensive form/modal documentation Add conditional fly-in animation for modals Fix non-deterministic bundle compilation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
70 lines
1.4 KiB
JavaScript
70 lines
1.4 KiB
JavaScript
let Declaration = require('../declaration')
|
|
let {
|
|
getGridGap,
|
|
inheritGridGap,
|
|
parseTemplate,
|
|
warnGridGap,
|
|
warnMissedAreas
|
|
} = require('./grid-utils')
|
|
|
|
class GridTemplate extends Declaration {
|
|
/**
|
|
* Translate grid-template to separate -ms- prefixed properties
|
|
*/
|
|
insert(decl, prefix, prefixes, result) {
|
|
if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
|
|
|
|
if (decl.parent.some(i => i.prop === '-ms-grid-rows')) {
|
|
return undefined
|
|
}
|
|
|
|
let gap = getGridGap(decl)
|
|
|
|
/**
|
|
* we must insert inherited gap values in some cases:
|
|
* if we are inside media query && if we have no grid-gap value
|
|
*/
|
|
let inheritedGap = inheritGridGap(decl, gap)
|
|
|
|
let { areas, columns, rows } = parseTemplate({
|
|
decl,
|
|
gap: inheritedGap || gap
|
|
})
|
|
|
|
let hasAreas = Object.keys(areas).length > 0
|
|
let hasRows = Boolean(rows)
|
|
let hasColumns = Boolean(columns)
|
|
|
|
warnGridGap({
|
|
decl,
|
|
gap,
|
|
hasColumns,
|
|
result
|
|
})
|
|
|
|
warnMissedAreas(areas, decl, result)
|
|
|
|
if ((hasRows && hasColumns) || hasAreas) {
|
|
decl.cloneBefore({
|
|
prop: '-ms-grid-rows',
|
|
raws: {},
|
|
value: rows
|
|
})
|
|
}
|
|
|
|
if (hasColumns) {
|
|
decl.cloneBefore({
|
|
prop: '-ms-grid-columns',
|
|
raws: {},
|
|
value: columns
|
|
})
|
|
}
|
|
|
|
return decl
|
|
}
|
|
}
|
|
|
|
GridTemplate.names = ['grid-template']
|
|
|
|
module.exports = GridTemplate
|