packages/okam-build/lib/processor/css/plugins/postcss-plugin-env.js
function processAppSpecifiedMediaRule(allAppTypes, appType, rule) {
    let result = matchAppMediaParams(allAppTypes, appType, rule.params);
    if (!result) {
        return;
    }

    let {removed, params} = result;
    params && (params = params.trim());
    if (removed) {
         // remove media rule, not current app media query target
        rule.remove();
    }
    else if (params) {
        // remove current app media query params
        rule.params = params;
    }
    else {
        // remove current app media query rule wrapping
        let children = rule.parent.nodes;
        let currRuleIdx = children.indexOf(rule);

        rule.nodes.forEach(item => {
            item.parent = rule.parent; // up parent

            let itemRaws = item.raws;
            let subNodes = item.nodes;

            // up raw style format
            subNodes && subNodes.forEach(
                sub => sub.raws.before = itemRaws.before
            );
            itemRaws.before = '\n';
            itemRaws.after = '\n';
        });

        children.splice(currRuleIdx, 1, ...rule.nodes);
        rule.nodes = null;
        rule.parent = null;
    }
}
function processAppSpecifiedMediaRule(allAppTypes, appType, rule) {
    let result = matchAppMediaParams(allAppTypes, appType, rule.params);
    if (!result) {
        return;
    }

    let {removed, params} = result;
    params && (params = params.trim());
    if (removed) {
         // remove media rule, not current app media query target
        rule.remove();
    }
    else if (params) {
        // remove current app media query params
        rule.params = params;
    }
    else {
        // remove current app media query rule wrapping
        let children = rule.parent.nodes;
        let currRuleIdx = children.indexOf(rule);

        rule.nodes.forEach(item => {
            item.parent = rule.parent; // up parent

            let itemRaws = item.raws;
            let subNodes = item.nodes;

            // up raw style format
            subNodes && subNodes.forEach(
                sub => sub.raws.before = itemRaws.before
            );
            itemRaws.before = '\n';
            itemRaws.after = '\n';
        });

        children.splice(currRuleIdx, 1, ...rule.nodes);
        rule.nodes = null;
        rule.parent = null;
    }
}
Process media rule.
Remove not current app media query target rule.
Remove current app media query params.

@inner
@param {Array.<string>} allAppTypes all supported build media target
@param {string} appType the current build media target
@param {Object} rule the media query rule