Syllabus/themes/piratecare/node_modules/tailwindcss/lib/plugins/borderWidth.js

46 lines
1.2 KiB
JavaScript
Raw Normal View History

2020-03-05 04:10:52 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _lodash = _interopRequireDefault(require("lodash"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _default() {
return function ({
addUtilities,
e,
theme,
variants
}) {
const generators = [(value, modifier) => ({
[`.${e(`border${modifier}`)}`]: {
borderWidth: `${value}`
}
}), (value, modifier) => ({
[`.${e(`border-t${modifier}`)}`]: {
borderTopWidth: `${value}`
},
[`.${e(`border-r${modifier}`)}`]: {
borderRightWidth: `${value}`
},
[`.${e(`border-b${modifier}`)}`]: {
borderBottomWidth: `${value}`
},
[`.${e(`border-l${modifier}`)}`]: {
borderLeftWidth: `${value}`
}
})];
const utilities = _lodash.default.flatMap(generators, generator => {
return _lodash.default.flatMap(theme('borderWidth'), (value, modifier) => {
return generator(value, modifier === 'default' ? '' : `-${modifier}`);
});
});
addUtilities(utilities, variants('borderWidth'));
};
}