• Home
  • Raw
  • Download

Lines Matching refs:valueArray

823   const valueArray = value.split(/\s+/)
824 if (valueArray.length === 1) {
825 expandFlexOne(key, valueArray, cssStyle, nodeLoc, log)
826 } else if (valueArray.length === 2) {
827 expandFlexTwo(key, value, valueArray, cssStyle, nodeLoc, log)
828 } else if (valueArray.length === 3) {
829 expandFlexThree(key, value, valueArray, cssStyle, nodeLoc, log)
840 function expandFlexOne(key, valueArray, cssStyle, nodeLoc, log) { argument
842 if (array.includes(valueArray[0])) {
843 cssStyle['flex'] = valueArray[0]
844 } else if (styler.getUnit(valueArray[0]) === 'px') {
845 cssStyle['flexBasis'] = valueArray[0]
846 } else if (styler.getUnit(valueArray[0]) === 'none') {
847 cssStyle['flexGrow'] = valueArray[0]
852 reason: 'ERROR: Value `' + valueArray[0] + '` of the `' + key + '` attribute is incorrect.' +
858 function expandFlexTwo(key, value, valueArray, cssStyle, nodeLoc, log) { argument
859 if (styler.getUnit(valueArray[0]) === 'none') {
860 cssStyle['flexGrow'] = valueArray[0]
861 if (styler.getUnit(valueArray[1]) === 'px') {
862 cssStyle['flexBasis'] = valueArray[1]
863 } else if (styler.getUnit(valueArray[1]) === 'none') {
864 cssStyle['flexShrink'] = valueArray[1]
870 valueArray[1] + '` must be a number or a number with unit `' + 'px`.',
878 valueArray[0] + '` must be a number.',
883 function expandFlexThree(key, value, valueArray, cssStyle, nodeLoc, log) { argument
884 if (styler.getUnit(valueArray[0]) === 'none' && styler.getUnit(valueArray[1]) === 'none' &&
885 styler.getUnit(valueArray[2]) === 'px') {
886 cssStyle['flexGrow'] = valueArray[0]
887 cssStyle['flexShrink'] = valueArray[1]
888 cssStyle['flexBasis'] = valueArray[2]