create-jant 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/template/node_modules/@jant/core/CHANGELOG.md +6 -0
- package/template/node_modules/@jant/core/package.json +1 -5
- package/template/node_modules/@jant/core/src/preset.css +3 -1
- package/template/node_modules/@tailwindcss/{postcss → vite}/README.md +11 -61
- package/template/node_modules/@tailwindcss/vite/dist/index.d.mts +13 -0
- package/template/node_modules/@tailwindcss/vite/dist/index.mjs +1 -0
- package/template/node_modules/@tailwindcss/vite/node_modules/.bin/vite +21 -0
- package/template/node_modules/@tailwindcss/vite/package.json +42 -0
- package/template/package.json +1 -3
- package/template/src/style.css +0 -3
- package/template/vite.config.ts +2 -8
- package/template/node_modules/.bin/autoprefixer +0 -21
- package/template/node_modules/@jant/core/src/tailwind.ts +0 -20
- package/template/node_modules/@tailwindcss/postcss/dist/index.d.mts +0 -25
- package/template/node_modules/@tailwindcss/postcss/dist/index.d.ts +0 -25
- package/template/node_modules/@tailwindcss/postcss/dist/index.js +0 -10
- package/template/node_modules/@tailwindcss/postcss/dist/index.mjs +0 -10
- package/template/node_modules/@tailwindcss/postcss/package.json +0 -46
- package/template/node_modules/autoprefixer/LICENSE +0 -20
- package/template/node_modules/autoprefixer/README.md +0 -57
- package/template/node_modules/autoprefixer/bin/autoprefixer +0 -22
- package/template/node_modules/autoprefixer/data/prefixes.js +0 -1139
- package/template/node_modules/autoprefixer/lib/at-rule.js +0 -35
- package/template/node_modules/autoprefixer/lib/autoprefixer.d.ts +0 -95
- package/template/node_modules/autoprefixer/lib/autoprefixer.js +0 -164
- package/template/node_modules/autoprefixer/lib/brackets.js +0 -51
- package/template/node_modules/autoprefixer/lib/browsers.js +0 -79
- package/template/node_modules/autoprefixer/lib/declaration.js +0 -187
- package/template/node_modules/autoprefixer/lib/hacks/align-content.js +0 -49
- package/template/node_modules/autoprefixer/lib/hacks/align-items.js +0 -46
- package/template/node_modules/autoprefixer/lib/hacks/align-self.js +0 -56
- package/template/node_modules/autoprefixer/lib/hacks/animation.js +0 -17
- package/template/node_modules/autoprefixer/lib/hacks/appearance.js +0 -23
- package/template/node_modules/autoprefixer/lib/hacks/autofill.js +0 -26
- package/template/node_modules/autoprefixer/lib/hacks/backdrop-filter.js +0 -20
- package/template/node_modules/autoprefixer/lib/hacks/background-clip.js +0 -24
- package/template/node_modules/autoprefixer/lib/hacks/background-size.js +0 -23
- package/template/node_modules/autoprefixer/lib/hacks/block-logical.js +0 -40
- package/template/node_modules/autoprefixer/lib/hacks/border-image.js +0 -15
- package/template/node_modules/autoprefixer/lib/hacks/border-radius.js +0 -40
- package/template/node_modules/autoprefixer/lib/hacks/break-props.js +0 -63
- package/template/node_modules/autoprefixer/lib/hacks/cross-fade.js +0 -35
- package/template/node_modules/autoprefixer/lib/hacks/display-flex.js +0 -65
- package/template/node_modules/autoprefixer/lib/hacks/display-grid.js +0 -21
- package/template/node_modules/autoprefixer/lib/hacks/file-selector-button.js +0 -26
- package/template/node_modules/autoprefixer/lib/hacks/filter-value.js +0 -14
- package/template/node_modules/autoprefixer/lib/hacks/filter.js +0 -19
- package/template/node_modules/autoprefixer/lib/hacks/flex-basis.js +0 -39
- package/template/node_modules/autoprefixer/lib/hacks/flex-direction.js +0 -72
- package/template/node_modules/autoprefixer/lib/hacks/flex-flow.js +0 -53
- package/template/node_modules/autoprefixer/lib/hacks/flex-grow.js +0 -30
- package/template/node_modules/autoprefixer/lib/hacks/flex-shrink.js +0 -39
- package/template/node_modules/autoprefixer/lib/hacks/flex-spec.js +0 -19
- package/template/node_modules/autoprefixer/lib/hacks/flex-wrap.js +0 -19
- package/template/node_modules/autoprefixer/lib/hacks/flex.js +0 -54
- package/template/node_modules/autoprefixer/lib/hacks/fullscreen.js +0 -20
- package/template/node_modules/autoprefixer/lib/hacks/gradient.js +0 -447
- package/template/node_modules/autoprefixer/lib/hacks/grid-area.js +0 -34
- package/template/node_modules/autoprefixer/lib/hacks/grid-column-align.js +0 -28
- package/template/node_modules/autoprefixer/lib/hacks/grid-end.js +0 -52
- package/template/node_modules/autoprefixer/lib/hacks/grid-row-align.js +0 -28
- package/template/node_modules/autoprefixer/lib/hacks/grid-row-column.js +0 -33
- package/template/node_modules/autoprefixer/lib/hacks/grid-rows-columns.js +0 -125
- package/template/node_modules/autoprefixer/lib/hacks/grid-start.js +0 -33
- package/template/node_modules/autoprefixer/lib/hacks/grid-template-areas.js +0 -84
- package/template/node_modules/autoprefixer/lib/hacks/grid-template.js +0 -69
- package/template/node_modules/autoprefixer/lib/hacks/grid-utils.js +0 -1117
- package/template/node_modules/autoprefixer/lib/hacks/image-rendering.js +0 -48
- package/template/node_modules/autoprefixer/lib/hacks/image-set.js +0 -18
- package/template/node_modules/autoprefixer/lib/hacks/inline-logical.js +0 -34
- package/template/node_modules/autoprefixer/lib/hacks/intrinsic.js +0 -61
- package/template/node_modules/autoprefixer/lib/hacks/justify-content.js +0 -54
- package/template/node_modules/autoprefixer/lib/hacks/mask-border.js +0 -38
- package/template/node_modules/autoprefixer/lib/hacks/mask-composite.js +0 -88
- package/template/node_modules/autoprefixer/lib/hacks/order.js +0 -42
- package/template/node_modules/autoprefixer/lib/hacks/overscroll-behavior.js +0 -33
- package/template/node_modules/autoprefixer/lib/hacks/pixelated.js +0 -34
- package/template/node_modules/autoprefixer/lib/hacks/place-self.js +0 -32
- package/template/node_modules/autoprefixer/lib/hacks/placeholder-shown.js +0 -19
- package/template/node_modules/autoprefixer/lib/hacks/placeholder.js +0 -33
- package/template/node_modules/autoprefixer/lib/hacks/print-color-adjust.js +0 -25
- package/template/node_modules/autoprefixer/lib/hacks/text-decoration-skip-ink.js +0 -23
- package/template/node_modules/autoprefixer/lib/hacks/text-decoration.js +0 -25
- package/template/node_modules/autoprefixer/lib/hacks/text-emphasis-position.js +0 -14
- package/template/node_modules/autoprefixer/lib/hacks/transform-decl.js +0 -79
- package/template/node_modules/autoprefixer/lib/hacks/user-select.js +0 -33
- package/template/node_modules/autoprefixer/lib/hacks/writing-mode.js +0 -42
- package/template/node_modules/autoprefixer/lib/info.js +0 -123
- package/template/node_modules/autoprefixer/lib/old-selector.js +0 -67
- package/template/node_modules/autoprefixer/lib/old-value.js +0 -22
- package/template/node_modules/autoprefixer/lib/prefixer.js +0 -144
- package/template/node_modules/autoprefixer/lib/prefixes.js +0 -428
- package/template/node_modules/autoprefixer/lib/processor.js +0 -709
- package/template/node_modules/autoprefixer/lib/resolution.js +0 -97
- package/template/node_modules/autoprefixer/lib/selector.js +0 -150
- package/template/node_modules/autoprefixer/lib/supports.js +0 -302
- package/template/node_modules/autoprefixer/lib/transition.js +0 -329
- package/template/node_modules/autoprefixer/lib/utils.js +0 -93
- package/template/node_modules/autoprefixer/lib/value.js +0 -125
- package/template/node_modules/autoprefixer/lib/vendor.js +0 -14
- package/template/node_modules/autoprefixer/node_modules/.bin/autoprefixer +0 -21
- package/template/node_modules/autoprefixer/node_modules/.bin/browserslist +0 -21
- package/template/node_modules/autoprefixer/package.json +0 -48
- package/template/node_modules/postcss/LICENSE +0 -20
- package/template/node_modules/postcss/README.md +0 -29
- package/template/node_modules/postcss/lib/at-rule.d.ts +0 -140
- package/template/node_modules/postcss/lib/at-rule.js +0 -25
- package/template/node_modules/postcss/lib/comment.d.ts +0 -68
- package/template/node_modules/postcss/lib/comment.js +0 -13
- package/template/node_modules/postcss/lib/container.d.ts +0 -483
- package/template/node_modules/postcss/lib/container.js +0 -447
- package/template/node_modules/postcss/lib/css-syntax-error.d.ts +0 -248
- package/template/node_modules/postcss/lib/css-syntax-error.js +0 -133
- package/template/node_modules/postcss/lib/declaration.d.ts +0 -151
- package/template/node_modules/postcss/lib/declaration.js +0 -24
- package/template/node_modules/postcss/lib/document.d.ts +0 -69
- package/template/node_modules/postcss/lib/document.js +0 -33
- package/template/node_modules/postcss/lib/fromJSON.d.ts +0 -9
- package/template/node_modules/postcss/lib/fromJSON.js +0 -54
- package/template/node_modules/postcss/lib/input.d.ts +0 -227
- package/template/node_modules/postcss/lib/input.js +0 -265
- package/template/node_modules/postcss/lib/lazy-result.d.ts +0 -190
- package/template/node_modules/postcss/lib/lazy-result.js +0 -550
- package/template/node_modules/postcss/lib/list.d.ts +0 -60
- package/template/node_modules/postcss/lib/list.js +0 -58
- package/template/node_modules/postcss/lib/map-generator.js +0 -368
- package/template/node_modules/postcss/lib/no-work-result.d.ts +0 -46
- package/template/node_modules/postcss/lib/no-work-result.js +0 -138
- package/template/node_modules/postcss/lib/node.d.ts +0 -556
- package/template/node_modules/postcss/lib/node.js +0 -449
- package/template/node_modules/postcss/lib/parse.d.ts +0 -9
- package/template/node_modules/postcss/lib/parse.js +0 -42
- package/template/node_modules/postcss/lib/parser.js +0 -611
- package/template/node_modules/postcss/lib/postcss.d.mts +0 -69
- package/template/node_modules/postcss/lib/postcss.d.ts +0 -458
- package/template/node_modules/postcss/lib/postcss.js +0 -101
- package/template/node_modules/postcss/lib/postcss.mjs +0 -30
- package/template/node_modules/postcss/lib/previous-map.d.ts +0 -81
- package/template/node_modules/postcss/lib/previous-map.js +0 -144
- package/template/node_modules/postcss/lib/processor.d.ts +0 -115
- package/template/node_modules/postcss/lib/processor.js +0 -67
- package/template/node_modules/postcss/lib/result.d.ts +0 -205
- package/template/node_modules/postcss/lib/result.js +0 -42
- package/template/node_modules/postcss/lib/root.d.ts +0 -87
- package/template/node_modules/postcss/lib/root.js +0 -61
- package/template/node_modules/postcss/lib/rule.d.ts +0 -126
- package/template/node_modules/postcss/lib/rule.js +0 -27
- package/template/node_modules/postcss/lib/stringifier.d.ts +0 -46
- package/template/node_modules/postcss/lib/stringifier.js +0 -353
- package/template/node_modules/postcss/lib/stringify.d.ts +0 -9
- package/template/node_modules/postcss/lib/stringify.js +0 -11
- package/template/node_modules/postcss/lib/symbols.js +0 -5
- package/template/node_modules/postcss/lib/terminal-highlight.js +0 -70
- package/template/node_modules/postcss/lib/tokenize.js +0 -266
- package/template/node_modules/postcss/lib/warn-once.js +0 -13
- package/template/node_modules/postcss/lib/warning.d.ts +0 -147
- package/template/node_modules/postcss/lib/warning.js +0 -37
- package/template/node_modules/postcss/node_modules/.bin/nanoid +0 -21
- package/template/node_modules/postcss/package.json +0 -88
- package/template/tailwind.config.ts +0 -13
- /package/template/node_modules/@tailwindcss/{postcss → vite}/LICENSE +0 -0
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
let Declaration = require('../declaration')
|
|
2
|
-
let flexSpec = require('./flex-spec')
|
|
3
|
-
|
|
4
|
-
class AlignSelf extends Declaration {
|
|
5
|
-
check(decl) {
|
|
6
|
-
return (
|
|
7
|
-
decl.parent &&
|
|
8
|
-
!decl.parent.some(i => {
|
|
9
|
-
return i.prop && i.prop.startsWith('grid-')
|
|
10
|
-
})
|
|
11
|
-
)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Return property name by final spec
|
|
16
|
-
*/
|
|
17
|
-
normalize() {
|
|
18
|
-
return 'align-self'
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Change property name for 2012 specs
|
|
23
|
-
*/
|
|
24
|
-
prefixed(prop, prefix) {
|
|
25
|
-
let spec
|
|
26
|
-
;[spec, prefix] = flexSpec(prefix)
|
|
27
|
-
if (spec === 2012) {
|
|
28
|
-
return prefix + 'flex-item-align'
|
|
29
|
-
}
|
|
30
|
-
return super.prefixed(prop, prefix)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Change value for 2012 spec and ignore prefix for 2009
|
|
35
|
-
*/
|
|
36
|
-
set(decl, prefix) {
|
|
37
|
-
let spec = flexSpec(prefix)[0]
|
|
38
|
-
if (spec === 2012) {
|
|
39
|
-
decl.value = AlignSelf.oldValues[decl.value] || decl.value
|
|
40
|
-
return super.set(decl, prefix)
|
|
41
|
-
}
|
|
42
|
-
if (spec === 'final') {
|
|
43
|
-
return super.set(decl, prefix)
|
|
44
|
-
}
|
|
45
|
-
return undefined
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
AlignSelf.names = ['align-self', 'flex-item-align']
|
|
50
|
-
|
|
51
|
-
AlignSelf.oldValues = {
|
|
52
|
-
'flex-end': 'end',
|
|
53
|
-
'flex-start': 'start'
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
module.exports = AlignSelf
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
let Declaration = require('../declaration')
|
|
2
|
-
|
|
3
|
-
class Animation extends Declaration {
|
|
4
|
-
/**
|
|
5
|
-
* Don’t add prefixes for modern values.
|
|
6
|
-
*/
|
|
7
|
-
check(decl) {
|
|
8
|
-
return !decl.value.split(/\s+/).some(i => {
|
|
9
|
-
let lower = i.toLowerCase()
|
|
10
|
-
return lower === 'reverse' || lower === 'alternate-reverse'
|
|
11
|
-
})
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
Animation.names = ['animation', 'animation-direction']
|
|
16
|
-
|
|
17
|
-
module.exports = Animation
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
let Declaration = require('../declaration')
|
|
2
|
-
let utils = require('../utils')
|
|
3
|
-
|
|
4
|
-
class Appearance extends Declaration {
|
|
5
|
-
constructor(name, prefixes, all) {
|
|
6
|
-
super(name, prefixes, all)
|
|
7
|
-
|
|
8
|
-
if (this.prefixes) {
|
|
9
|
-
this.prefixes = utils.uniq(
|
|
10
|
-
this.prefixes.map(i => {
|
|
11
|
-
if (i === '-ms-') {
|
|
12
|
-
return '-webkit-'
|
|
13
|
-
}
|
|
14
|
-
return i
|
|
15
|
-
})
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
Appearance.names = ['appearance']
|
|
22
|
-
|
|
23
|
-
module.exports = Appearance
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
let Selector = require('../selector')
|
|
2
|
-
let utils = require('../utils')
|
|
3
|
-
|
|
4
|
-
class Autofill extends Selector {
|
|
5
|
-
constructor(name, prefixes, all) {
|
|
6
|
-
super(name, prefixes, all)
|
|
7
|
-
|
|
8
|
-
if (this.prefixes) {
|
|
9
|
-
this.prefixes = utils.uniq(this.prefixes.map(() => '-webkit-'))
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Return different selectors depend on prefix
|
|
15
|
-
*/
|
|
16
|
-
prefixed(prefix) {
|
|
17
|
-
if (prefix === '-webkit-') {
|
|
18
|
-
return ':-webkit-autofill'
|
|
19
|
-
}
|
|
20
|
-
return `:${prefix}autofill`
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
Autofill.names = [':autofill']
|
|
25
|
-
|
|
26
|
-
module.exports = Autofill
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
let Declaration = require('../declaration')
|
|
2
|
-
let utils = require('../utils')
|
|
3
|
-
|
|
4
|
-
class BackdropFilter extends Declaration {
|
|
5
|
-
constructor(name, prefixes, all) {
|
|
6
|
-
super(name, prefixes, all)
|
|
7
|
-
|
|
8
|
-
if (this.prefixes) {
|
|
9
|
-
this.prefixes = utils.uniq(
|
|
10
|
-
this.prefixes.map(i => {
|
|
11
|
-
return i === '-ms-' ? '-webkit-' : i
|
|
12
|
-
})
|
|
13
|
-
)
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
BackdropFilter.names = ['backdrop-filter']
|
|
19
|
-
|
|
20
|
-
module.exports = BackdropFilter
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
let Declaration = require('../declaration')
|
|
2
|
-
let utils = require('../utils')
|
|
3
|
-
|
|
4
|
-
class BackgroundClip extends Declaration {
|
|
5
|
-
constructor(name, prefixes, all) {
|
|
6
|
-
super(name, prefixes, all)
|
|
7
|
-
|
|
8
|
-
if (this.prefixes) {
|
|
9
|
-
this.prefixes = utils.uniq(
|
|
10
|
-
this.prefixes.map(i => {
|
|
11
|
-
return i === '-ms-' ? '-webkit-' : i
|
|
12
|
-
})
|
|
13
|
-
)
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
check(decl) {
|
|
18
|
-
return decl.value.toLowerCase() === 'text'
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
BackgroundClip.names = ['background-clip']
|
|
23
|
-
|
|
24
|
-
module.exports = BackgroundClip
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
let Declaration = require('../declaration')
|
|
2
|
-
|
|
3
|
-
class BackgroundSize extends Declaration {
|
|
4
|
-
/**
|
|
5
|
-
* Duplication parameter for -webkit- browsers
|
|
6
|
-
*/
|
|
7
|
-
set(decl, prefix) {
|
|
8
|
-
let value = decl.value.toLowerCase()
|
|
9
|
-
if (
|
|
10
|
-
prefix === '-webkit-' &&
|
|
11
|
-
!value.includes(' ') &&
|
|
12
|
-
value !== 'contain' &&
|
|
13
|
-
value !== 'cover'
|
|
14
|
-
) {
|
|
15
|
-
decl.value = decl.value + ' ' + decl.value
|
|
16
|
-
}
|
|
17
|
-
return super.set(decl, prefix)
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
BackgroundSize.names = ['background-size']
|
|
22
|
-
|
|
23
|
-
module.exports = BackgroundSize
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
let Declaration = require('../declaration')
|
|
2
|
-
|
|
3
|
-
class BlockLogical extends Declaration {
|
|
4
|
-
/**
|
|
5
|
-
* Return property name by spec
|
|
6
|
-
*/
|
|
7
|
-
normalize(prop) {
|
|
8
|
-
if (prop.includes('-before')) {
|
|
9
|
-
return prop.replace('-before', '-block-start')
|
|
10
|
-
}
|
|
11
|
-
return prop.replace('-after', '-block-end')
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Use old syntax for -moz- and -webkit-
|
|
16
|
-
*/
|
|
17
|
-
prefixed(prop, prefix) {
|
|
18
|
-
if (prop.includes('-start')) {
|
|
19
|
-
return prefix + prop.replace('-block-start', '-before')
|
|
20
|
-
}
|
|
21
|
-
return prefix + prop.replace('-block-end', '-after')
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
BlockLogical.names = [
|
|
26
|
-
'border-block-start',
|
|
27
|
-
'border-block-end',
|
|
28
|
-
'margin-block-start',
|
|
29
|
-
'margin-block-end',
|
|
30
|
-
'padding-block-start',
|
|
31
|
-
'padding-block-end',
|
|
32
|
-
'border-before',
|
|
33
|
-
'border-after',
|
|
34
|
-
'margin-before',
|
|
35
|
-
'margin-after',
|
|
36
|
-
'padding-before',
|
|
37
|
-
'padding-after'
|
|
38
|
-
]
|
|
39
|
-
|
|
40
|
-
module.exports = BlockLogical
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
let Declaration = require('../declaration')
|
|
2
|
-
|
|
3
|
-
class BorderImage extends Declaration {
|
|
4
|
-
/**
|
|
5
|
-
* Remove fill parameter for prefixed declarations
|
|
6
|
-
*/
|
|
7
|
-
set(decl, prefix) {
|
|
8
|
-
decl.value = decl.value.replace(/\s+fill(\s)/, '$1')
|
|
9
|
-
return super.set(decl, prefix)
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
BorderImage.names = ['border-image']
|
|
14
|
-
|
|
15
|
-
module.exports = BorderImage
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
let Declaration = require('../declaration')
|
|
2
|
-
|
|
3
|
-
class BorderRadius extends Declaration {
|
|
4
|
-
/**
|
|
5
|
-
* Return unprefixed version of property
|
|
6
|
-
*/
|
|
7
|
-
normalize(prop) {
|
|
8
|
-
return BorderRadius.toNormal[prop] || prop
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Change syntax, when add Mozilla prefix
|
|
13
|
-
*/
|
|
14
|
-
prefixed(prop, prefix) {
|
|
15
|
-
if (prefix === '-moz-') {
|
|
16
|
-
return prefix + (BorderRadius.toMozilla[prop] || prop)
|
|
17
|
-
}
|
|
18
|
-
return super.prefixed(prop, prefix)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
BorderRadius.names = ['border-radius']
|
|
23
|
-
|
|
24
|
-
BorderRadius.toMozilla = {}
|
|
25
|
-
BorderRadius.toNormal = {}
|
|
26
|
-
|
|
27
|
-
for (let ver of ['top', 'bottom']) {
|
|
28
|
-
for (let hor of ['left', 'right']) {
|
|
29
|
-
let normal = `border-${ver}-${hor}-radius`
|
|
30
|
-
let mozilla = `border-radius-${ver}${hor}`
|
|
31
|
-
|
|
32
|
-
BorderRadius.names.push(normal)
|
|
33
|
-
BorderRadius.names.push(mozilla)
|
|
34
|
-
|
|
35
|
-
BorderRadius.toMozilla[normal] = mozilla
|
|
36
|
-
BorderRadius.toNormal[mozilla] = normal
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
module.exports = BorderRadius
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
let Declaration = require('../declaration')
|
|
2
|
-
|
|
3
|
-
class BreakProps extends Declaration {
|
|
4
|
-
/**
|
|
5
|
-
* Don’t prefix some values
|
|
6
|
-
*/
|
|
7
|
-
insert(decl, prefix, prefixes) {
|
|
8
|
-
if (decl.prop !== 'break-inside') {
|
|
9
|
-
return super.insert(decl, prefix, prefixes)
|
|
10
|
-
}
|
|
11
|
-
if (/region/i.test(decl.value) || /page/i.test(decl.value)) {
|
|
12
|
-
return undefined
|
|
13
|
-
}
|
|
14
|
-
return super.insert(decl, prefix, prefixes)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Return property name by final spec
|
|
19
|
-
*/
|
|
20
|
-
normalize(prop) {
|
|
21
|
-
if (prop.includes('inside')) {
|
|
22
|
-
return 'break-inside'
|
|
23
|
-
}
|
|
24
|
-
if (prop.includes('before')) {
|
|
25
|
-
return 'break-before'
|
|
26
|
-
}
|
|
27
|
-
return 'break-after'
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Change name for -webkit- and -moz- prefix
|
|
32
|
-
*/
|
|
33
|
-
prefixed(prop, prefix) {
|
|
34
|
-
return `${prefix}column-${prop}`
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Change prefixed value for avoid-column and avoid-page
|
|
39
|
-
*/
|
|
40
|
-
set(decl, prefix) {
|
|
41
|
-
if (
|
|
42
|
-
(decl.prop === 'break-inside' && decl.value === 'avoid-column') ||
|
|
43
|
-
decl.value === 'avoid-page'
|
|
44
|
-
) {
|
|
45
|
-
decl.value = 'avoid'
|
|
46
|
-
}
|
|
47
|
-
return super.set(decl, prefix)
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
BreakProps.names = [
|
|
52
|
-
'break-inside',
|
|
53
|
-
'page-break-inside',
|
|
54
|
-
'column-break-inside',
|
|
55
|
-
'break-before',
|
|
56
|
-
'page-break-before',
|
|
57
|
-
'column-break-before',
|
|
58
|
-
'break-after',
|
|
59
|
-
'page-break-after',
|
|
60
|
-
'column-break-after'
|
|
61
|
-
]
|
|
62
|
-
|
|
63
|
-
module.exports = BreakProps
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
let list = require('postcss').list
|
|
2
|
-
|
|
3
|
-
let Value = require('../value')
|
|
4
|
-
|
|
5
|
-
class CrossFade extends Value {
|
|
6
|
-
replace(string, prefix) {
|
|
7
|
-
return list
|
|
8
|
-
.space(string)
|
|
9
|
-
.map(value => {
|
|
10
|
-
if (value.slice(0, +this.name.length + 1) !== this.name + '(') {
|
|
11
|
-
return value
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
let close = value.lastIndexOf(')')
|
|
15
|
-
let after = value.slice(close + 1)
|
|
16
|
-
let args = value.slice(this.name.length + 1, close)
|
|
17
|
-
|
|
18
|
-
if (prefix === '-webkit-') {
|
|
19
|
-
let match = args.match(/\d*.?\d+%?/)
|
|
20
|
-
if (match) {
|
|
21
|
-
args = args.slice(match[0].length).trim()
|
|
22
|
-
args += `, ${match[0]}`
|
|
23
|
-
} else {
|
|
24
|
-
args += ', 0.5'
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return prefix + this.name + '(' + args + ')' + after
|
|
28
|
-
})
|
|
29
|
-
.join(' ')
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
CrossFade.names = ['cross-fade']
|
|
34
|
-
|
|
35
|
-
module.exports = CrossFade
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
let OldValue = require('../old-value')
|
|
2
|
-
let Value = require('../value')
|
|
3
|
-
let flexSpec = require('./flex-spec')
|
|
4
|
-
|
|
5
|
-
class DisplayFlex extends Value {
|
|
6
|
-
constructor(name, prefixes) {
|
|
7
|
-
super(name, prefixes)
|
|
8
|
-
if (name === 'display-flex') {
|
|
9
|
-
this.name = 'flex'
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Faster check for flex value
|
|
15
|
-
*/
|
|
16
|
-
check(decl) {
|
|
17
|
-
return decl.prop === 'display' && decl.value === this.name
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Change value for old specs
|
|
22
|
-
*/
|
|
23
|
-
old(prefix) {
|
|
24
|
-
let prefixed = this.prefixed(prefix)
|
|
25
|
-
if (!prefixed) return undefined
|
|
26
|
-
return new OldValue(this.name, prefixed)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Return value by spec
|
|
31
|
-
*/
|
|
32
|
-
prefixed(prefix) {
|
|
33
|
-
let spec, value
|
|
34
|
-
;[spec, prefix] = flexSpec(prefix)
|
|
35
|
-
|
|
36
|
-
if (spec === 2009) {
|
|
37
|
-
if (this.name === 'flex') {
|
|
38
|
-
value = 'box'
|
|
39
|
-
} else {
|
|
40
|
-
value = 'inline-box'
|
|
41
|
-
}
|
|
42
|
-
} else if (spec === 2012) {
|
|
43
|
-
if (this.name === 'flex') {
|
|
44
|
-
value = 'flexbox'
|
|
45
|
-
} else {
|
|
46
|
-
value = 'inline-flexbox'
|
|
47
|
-
}
|
|
48
|
-
} else if (spec === 'final') {
|
|
49
|
-
value = this.name
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return prefix + value
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Add prefix to value depend on flebox spec version
|
|
57
|
-
*/
|
|
58
|
-
replace(string, prefix) {
|
|
59
|
-
return this.prefixed(prefix)
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
DisplayFlex.names = ['display-flex', 'inline-flex']
|
|
64
|
-
|
|
65
|
-
module.exports = DisplayFlex
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
let Value = require('../value')
|
|
2
|
-
|
|
3
|
-
class DisplayGrid extends Value {
|
|
4
|
-
constructor(name, prefixes) {
|
|
5
|
-
super(name, prefixes)
|
|
6
|
-
if (name === 'display-grid') {
|
|
7
|
-
this.name = 'grid'
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Faster check for flex value
|
|
13
|
-
*/
|
|
14
|
-
check(decl) {
|
|
15
|
-
return decl.prop === 'display' && decl.value === this.name
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
DisplayGrid.names = ['display-grid', 'inline-grid']
|
|
20
|
-
|
|
21
|
-
module.exports = DisplayGrid
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
let Selector = require('../selector')
|
|
2
|
-
let utils = require('../utils')
|
|
3
|
-
|
|
4
|
-
class FileSelectorButton extends Selector {
|
|
5
|
-
constructor(name, prefixes, all) {
|
|
6
|
-
super(name, prefixes, all)
|
|
7
|
-
|
|
8
|
-
if (this.prefixes) {
|
|
9
|
-
this.prefixes = utils.uniq(this.prefixes.map(() => '-webkit-'))
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Return different selectors depend on prefix
|
|
15
|
-
*/
|
|
16
|
-
prefixed(prefix) {
|
|
17
|
-
if (prefix === '-webkit-') {
|
|
18
|
-
return '::-webkit-file-upload-button'
|
|
19
|
-
}
|
|
20
|
-
return `::${prefix}file-selector-button`
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
FileSelectorButton.names = ['::file-selector-button']
|
|
25
|
-
|
|
26
|
-
module.exports = FileSelectorButton
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
let Value = require('../value')
|
|
2
|
-
|
|
3
|
-
class FilterValue extends Value {
|
|
4
|
-
constructor(name, prefixes) {
|
|
5
|
-
super(name, prefixes)
|
|
6
|
-
if (name === 'filter-function') {
|
|
7
|
-
this.name = 'filter'
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
FilterValue.names = ['filter', 'filter-function']
|
|
13
|
-
|
|
14
|
-
module.exports = FilterValue
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
let Declaration = require('../declaration')
|
|
2
|
-
|
|
3
|
-
class Filter extends Declaration {
|
|
4
|
-
/**
|
|
5
|
-
* Check is it Internet Explorer filter
|
|
6
|
-
*/
|
|
7
|
-
check(decl) {
|
|
8
|
-
let v = decl.value
|
|
9
|
-
return (
|
|
10
|
-
!v.toLowerCase().includes('alpha(') &&
|
|
11
|
-
!v.includes('DXImageTransform.Microsoft') &&
|
|
12
|
-
!v.includes('data:image/svg+xml')
|
|
13
|
-
)
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
Filter.names = ['filter']
|
|
18
|
-
|
|
19
|
-
module.exports = Filter
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
let Declaration = require('../declaration')
|
|
2
|
-
let flexSpec = require('./flex-spec')
|
|
3
|
-
|
|
4
|
-
class FlexBasis extends Declaration {
|
|
5
|
-
/**
|
|
6
|
-
* Return property name by final spec
|
|
7
|
-
*/
|
|
8
|
-
normalize() {
|
|
9
|
-
return 'flex-basis'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Return flex property for 2012 spec
|
|
14
|
-
*/
|
|
15
|
-
prefixed(prop, prefix) {
|
|
16
|
-
let spec
|
|
17
|
-
;[spec, prefix] = flexSpec(prefix)
|
|
18
|
-
if (spec === 2012) {
|
|
19
|
-
return prefix + 'flex-preferred-size'
|
|
20
|
-
}
|
|
21
|
-
return super.prefixed(prop, prefix)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Ignore 2009 spec and use flex property for 2012
|
|
26
|
-
*/
|
|
27
|
-
set(decl, prefix) {
|
|
28
|
-
let spec
|
|
29
|
-
;[spec, prefix] = flexSpec(prefix)
|
|
30
|
-
if (spec === 2012 || spec === 'final') {
|
|
31
|
-
return super.set(decl, prefix)
|
|
32
|
-
}
|
|
33
|
-
return undefined
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
FlexBasis.names = ['flex-basis', 'flex-preferred-size']
|
|
38
|
-
|
|
39
|
-
module.exports = FlexBasis
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
let Declaration = require('../declaration')
|
|
2
|
-
let flexSpec = require('./flex-spec')
|
|
3
|
-
|
|
4
|
-
class FlexDirection extends Declaration {
|
|
5
|
-
/**
|
|
6
|
-
* Use two properties for 2009 spec
|
|
7
|
-
*/
|
|
8
|
-
insert(decl, prefix, prefixes) {
|
|
9
|
-
let spec
|
|
10
|
-
;[spec, prefix] = flexSpec(prefix)
|
|
11
|
-
if (spec !== 2009) {
|
|
12
|
-
return super.insert(decl, prefix, prefixes)
|
|
13
|
-
}
|
|
14
|
-
let already = decl.parent.some(
|
|
15
|
-
i =>
|
|
16
|
-
i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction'
|
|
17
|
-
)
|
|
18
|
-
if (already) {
|
|
19
|
-
return undefined
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
let v = decl.value
|
|
23
|
-
let dir, orient
|
|
24
|
-
if (v === 'inherit' || v === 'initial' || v === 'unset') {
|
|
25
|
-
orient = v
|
|
26
|
-
dir = v
|
|
27
|
-
} else {
|
|
28
|
-
orient = v.includes('row') ? 'horizontal' : 'vertical'
|
|
29
|
-
dir = v.includes('reverse') ? 'reverse' : 'normal'
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
let cloned = this.clone(decl)
|
|
33
|
-
cloned.prop = prefix + 'box-orient'
|
|
34
|
-
cloned.value = orient
|
|
35
|
-
if (this.needCascade(decl)) {
|
|
36
|
-
cloned.raws.before = this.calcBefore(prefixes, decl, prefix)
|
|
37
|
-
}
|
|
38
|
-
decl.parent.insertBefore(decl, cloned)
|
|
39
|
-
|
|
40
|
-
cloned = this.clone(decl)
|
|
41
|
-
cloned.prop = prefix + 'box-direction'
|
|
42
|
-
cloned.value = dir
|
|
43
|
-
if (this.needCascade(decl)) {
|
|
44
|
-
cloned.raws.before = this.calcBefore(prefixes, decl, prefix)
|
|
45
|
-
}
|
|
46
|
-
return decl.parent.insertBefore(decl, cloned)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Return property name by final spec
|
|
51
|
-
*/
|
|
52
|
-
normalize() {
|
|
53
|
-
return 'flex-direction'
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Clean two properties for 2009 spec
|
|
58
|
-
*/
|
|
59
|
-
old(prop, prefix) {
|
|
60
|
-
let spec
|
|
61
|
-
;[spec, prefix] = flexSpec(prefix)
|
|
62
|
-
if (spec === 2009) {
|
|
63
|
-
return [prefix + 'box-orient', prefix + 'box-direction']
|
|
64
|
-
} else {
|
|
65
|
-
return super.old(prop, prefix)
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
FlexDirection.names = ['flex-direction', 'box-direction', 'box-orient']
|
|
71
|
-
|
|
72
|
-
module.exports = FlexDirection
|