This repository has been archived on 2020-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
Syllabus/themes/piratecare/node_modules/tailwindcss/lib/lib/substituteScreenAtRules.js

29 lines
733 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _lodash = _interopRequireDefault(require("lodash"));
var _buildMediaQuery = _interopRequireDefault(require("../util/buildMediaQuery"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _default({
theme
}) {
return function (css) {
css.walkAtRules('screen', atRule => {
const screen = atRule.params;
if (!_lodash.default.has(theme.screens, screen)) {
throw atRule.error(`No \`${screen}\` screen found.`);
}
atRule.name = 'media';
atRule.params = (0, _buildMediaQuery.default)(theme.screens[screen]);
});
};
}