From 1f0440074ac1855f508724b3716d8e421d6dbe83 Mon Sep 17 00:00:00 2001 From: dpang314 Date: Wed, 15 Jun 2022 06:13:25 -0400 Subject: [PATCH] fix(cssnano-preset): disable z-index minification (#7593) * fix(cssnano-preset): disable z-index minification * add z-index tests link to pages tests * revert change to docs --- packages/docusaurus-cssnano-preset/src/index.ts | 2 ++ website/_dogfooding/_pages tests/index.md | 1 + .../_dogfooding/_pages tests/z-index-tests.tsx | 17 +++++++++++++++++ website/_dogfooding/dogfooding.css | 4 ++++ 4 files changed, 24 insertions(+) create mode 100644 website/_dogfooding/_pages tests/z-index-tests.tsx diff --git a/packages/docusaurus-cssnano-preset/src/index.ts b/packages/docusaurus-cssnano-preset/src/index.ts index 6bae42c6f8..ddea9fc0ed 100644 --- a/packages/docusaurus-cssnano-preset/src/index.ts +++ b/packages/docusaurus-cssnano-preset/src/index.ts @@ -13,6 +13,8 @@ const preset: typeof advancedBasePreset = function preset(opts) { const advancedPreset = advancedBasePreset({ autoprefixer: {add: false}, discardComments: {removeAll: true}, + /* cSpell:ignore zindex */ + zindex: false, ...opts, }); diff --git a/website/_dogfooding/_pages tests/index.md b/website/_dogfooding/_pages tests/index.md index cf94300fb8..d54f03fcd3 100644 --- a/website/_dogfooding/_pages tests/index.md +++ b/website/_dogfooding/_pages tests/index.md @@ -28,3 +28,4 @@ import Readme from "../README.md" - [General Markdown tests](/tests/pages/markdownPageTests) - [TOC tests](/tests/pages/page-toc-tests) - [Tabs tests](/tests/pages/tabs-tests) +- [z-index tests](/tests/pages/z-index-tests) diff --git a/website/_dogfooding/_pages tests/z-index-tests.tsx b/website/_dogfooding/_pages tests/z-index-tests.tsx new file mode 100644 index 0000000000..d1d076b894 --- /dev/null +++ b/website/_dogfooding/_pages tests/z-index-tests.tsx @@ -0,0 +1,17 @@ +/** + * 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 React from 'react'; +import Layout from '@theme/Layout'; + +export default function zIndexTest(): JSX.Element { + return ( + +

This should have a z-index of 100

+
+ ); +} diff --git a/website/_dogfooding/dogfooding.css b/website/_dogfooding/dogfooding.css index be6cf970b6..f1864ef8fb 100644 --- a/website/_dogfooding/dogfooding.css +++ b/website/_dogfooding/dogfooding.css @@ -20,3 +20,7 @@ html.plugin-blog.plugin-id-blog-tests .navbar { html.plugin-pages.plugin-id-pages-tests .navbar { border-bottom: solid thin yellow; } + +#z-index-test { + z-index: 100; +}