mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-07 14:17:16 +02:00
* fix(cssnano-preset): disable z-index minification * add z-index tests link to pages tests * revert change to docs
29 lines
848 B
TypeScript
29 lines
848 B
TypeScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
import advancedBasePreset from 'cssnano-preset-advanced';
|
|
import postCssSortMediaQueries from 'postcss-sort-media-queries';
|
|
import postCssRemoveOverriddenCustomProperties from './remove-overridden-custom-properties';
|
|
|
|
const preset: typeof advancedBasePreset = function preset(opts) {
|
|
const advancedPreset = advancedBasePreset({
|
|
autoprefixer: {add: false},
|
|
discardComments: {removeAll: true},
|
|
/* cSpell:ignore zindex */
|
|
zindex: false,
|
|
...opts,
|
|
});
|
|
|
|
advancedPreset.plugins.unshift(
|
|
[postCssSortMediaQueries, undefined],
|
|
[postCssRemoveOverriddenCustomProperties, undefined],
|
|
);
|
|
|
|
return advancedPreset;
|
|
};
|
|
|
|
export = preset;
|