test: ensure consistent CSS ordering (#6222)

This commit is contained in:
Sébastien Lorber 2021-12-30 14:26:26 +01:00 committed by GitHub
parent c45d9c6a89
commit 7adc1c0cdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 178 additions and 3 deletions

View file

@ -171,3 +171,11 @@ div[class^='announcementBar_'] {
width: 1px;
white-space: nowrap;
}
/* Used to test CSS insertion order */
.test-marker-site-custom-css-unique-rule {
content: "site-custom-css-unique-rule";
}
.test-marker-site-custom-css-shared-rule {
max-width: 100%;
}

View file

@ -153,3 +153,8 @@
display: none;
}
}
/* Used to test CSS insertion order */
.test-marker-site-index-page {
content: "site-index-page";
}

View file

@ -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 type {Props} from '@theme/Layout';
import Layout from '@theme-original/Layout';
// This component is only used to test for CSS insertion order
import './styles.module.css';
export default function LayoutWrapper(props: Props): JSX.Element {
return <Layout {...props} />;
}

View file

@ -0,0 +1,12 @@
/**
* 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.
*/
/* Used to test CSS insertion order */
.test-marker-theme-layout {
content: "theme-layout";
}