Начат фронтенд
This commit is contained in:
52
node_modules/autoprefixer/lib/hacks/grid-utils.js
generated
vendored
52
node_modules/autoprefixer/lib/hacks/grid-utils.js
generated
vendored
@@ -90,7 +90,7 @@ function insertDecl(decl, prop, value) {
|
||||
|
||||
exports.prefixTrackProp = prefixTrackProp
|
||||
|
||||
function prefixTrackProp({ prefix, prop }) {
|
||||
function prefixTrackProp({ prop, prefix }) {
|
||||
return prefix + prop.replace('template-', '')
|
||||
}
|
||||
|
||||
@@ -105,9 +105,9 @@ function transformRepeat({ nodes }, { gap }) {
|
||||
return result
|
||||
},
|
||||
{
|
||||
count: [],
|
||||
key: 'count',
|
||||
size: []
|
||||
size: [],
|
||||
count: []
|
||||
}
|
||||
)
|
||||
|
||||
@@ -132,7 +132,7 @@ function transformRepeat({ nodes }, { gap }) {
|
||||
|
||||
exports.prefixTrackValue = prefixTrackValue
|
||||
|
||||
function prefixTrackValue({ gap, value }) {
|
||||
function prefixTrackValue({ value, gap }) {
|
||||
let result = parser(value).nodes.reduce((nodes, node) => {
|
||||
if (node.type === 'function' && node.value === 'repeat') {
|
||||
return nodes.concat({
|
||||
@@ -164,7 +164,7 @@ function prefixTrackValue({ gap, value }) {
|
||||
let DOTS = /^\.+$/
|
||||
|
||||
function track(start, end) {
|
||||
return { end, span: end - start, start }
|
||||
return { start, end, span: end - start }
|
||||
}
|
||||
|
||||
function getColumns(line) {
|
||||
@@ -173,7 +173,7 @@ function getColumns(line) {
|
||||
|
||||
exports.parseGridAreas = parseGridAreas
|
||||
|
||||
function parseGridAreas({ gap, rows }) {
|
||||
function parseGridAreas({ rows, gap }) {
|
||||
return rows.reduce((areas, line, rowIndex) => {
|
||||
if (gap.row) rowIndex *= 2
|
||||
|
||||
@@ -248,25 +248,25 @@ function parseTemplate({ decl, gap }) {
|
||||
return result
|
||||
},
|
||||
{
|
||||
areas: [],
|
||||
columns: [],
|
||||
key: 'rows',
|
||||
rows: []
|
||||
columns: [],
|
||||
rows: [],
|
||||
areas: []
|
||||
}
|
||||
)
|
||||
|
||||
return {
|
||||
areas: parseGridAreas({
|
||||
gap,
|
||||
rows: gridTemplate.areas
|
||||
rows: gridTemplate.areas,
|
||||
gap
|
||||
}),
|
||||
columns: prefixTrackValue({
|
||||
gap: gap.column,
|
||||
value: gridTemplate.columns.join(' ')
|
||||
value: gridTemplate.columns.join(' '),
|
||||
gap: gap.column
|
||||
}),
|
||||
rows: prefixTrackValue({
|
||||
gap: gap.row,
|
||||
value: gridTemplate.rows.join(' ')
|
||||
value: gridTemplate.rows.join(' '),
|
||||
gap: gap.row
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -429,12 +429,12 @@ function parseGridTemplatesData(css) {
|
||||
|
||||
parsed[index].allAreas = uniq([...allAreas, ...areaNames])
|
||||
parsed[index].rules.push({
|
||||
areas,
|
||||
duplicateAreaNames,
|
||||
hasDuplicates: !hasNoDuplicates,
|
||||
node: rule,
|
||||
params: media.params,
|
||||
selectors: rule.selectors
|
||||
selectors: rule.selectors,
|
||||
node: rule,
|
||||
duplicateAreaNames,
|
||||
areas
|
||||
})
|
||||
} else {
|
||||
// index is NOT found, push the new item to the parsed array
|
||||
@@ -443,13 +443,13 @@ function parseGridTemplatesData(css) {
|
||||
areasCount: 0,
|
||||
rules: [
|
||||
{
|
||||
areas,
|
||||
duplicateAreaNames: [],
|
||||
duplicateRules: [],
|
||||
hasDuplicates: false,
|
||||
node: rule,
|
||||
duplicateRules: [],
|
||||
params: media.params,
|
||||
selectors: rule.selectors
|
||||
selectors: rule.selectors,
|
||||
node: rule,
|
||||
duplicateAreaNames: [],
|
||||
areas
|
||||
}
|
||||
]
|
||||
})
|
||||
@@ -993,7 +993,7 @@ function inheritGridGap(decl, gap) {
|
||||
|
||||
exports.warnGridGap = warnGridGap
|
||||
|
||||
function warnGridGap({ decl, gap, hasColumns, result }) {
|
||||
function warnGridGap({ gap, hasColumns, decl, result }) {
|
||||
let hasBothGaps = gap.row && gap.column
|
||||
if (!hasColumns && (hasBothGaps || (gap.column && !gap.row))) {
|
||||
delete gap.column
|
||||
@@ -1079,7 +1079,7 @@ function autoplaceGridItems(decl, result, gap, autoflowValue = 'row') {
|
||||
).join(' ')
|
||||
})
|
||||
|
||||
let areas = parseGridAreas({ gap, rows: filledRows })
|
||||
let areas = parseGridAreas({ rows: filledRows, gap })
|
||||
let keys = Object.keys(areas)
|
||||
let items = keys.map(i => areas[i])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user