summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/components/context
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-11-13 14:48:40 +0000
committerGitHub <noreply@github.com>2022-11-13 14:48:40 +0000
commit183cfa96910ebb74c668dea7ef98071966f8fcb9 (patch)
treeb3e42d26a6e35868fcdbcfbec89142a8f05c7a78 /opendc-web/opendc-web-ui/src/components/context
parent085b51c720e2a106e7ac71e3c8595d3bf0dd0aa3 (diff)
parent09a11e1d55246bfeea08c16689b966d6ae437ef5 (diff)
merge: Remove use of Sass (#116)
This pull request removes the dependency on Sass for the OpenDC web UI, by converting the existing Sass files into CSS. With the recent updates of CSS, we have no use-case for Sass anymore and sticking to CSS reduces the build infrastructure necessary. ## Implementation Notes :hammer_and_pick: * Drop dependency on Sass * Update web dependencies to latest version
Diffstat (limited to 'opendc-web/opendc-web-ui/src/components/context')
-rw-r--r--opendc-web/opendc-web-ui/src/components/context/ContextSelectionSection.js2
-rw-r--r--opendc-web/opendc-web-ui/src/components/context/ContextSelectionSection.module.css (renamed from opendc-web/opendc-web-ui/src/components/context/ContextSelectionSection.module.scss)0
-rw-r--r--opendc-web/opendc-web-ui/src/components/context/ContextSelector.js2
-rw-r--r--opendc-web/opendc-web-ui/src/components/context/ContextSelector.module.css (renamed from opendc-web/opendc-web-ui/src/components/context/ContextSelector.module.scss)20
4 files changed, 11 insertions, 13 deletions
diff --git a/opendc-web/opendc-web-ui/src/components/context/ContextSelectionSection.js b/opendc-web/opendc-web-ui/src/components/context/ContextSelectionSection.js
index 5d3a6441..f3c25b79 100644
--- a/opendc-web/opendc-web-ui/src/components/context/ContextSelectionSection.js
+++ b/opendc-web/opendc-web-ui/src/components/context/ContextSelectionSection.js
@@ -21,7 +21,7 @@
*/
import PropTypes from 'prop-types'
-import { contextSelectionSection } from './ContextSelectionSection.module.scss'
+import { contextSelectionSection } from './ContextSelectionSection.module.css'
function ContextSelectionSection({ children }) {
return <section className={contextSelectionSection}>{children}</section>
diff --git a/opendc-web/opendc-web-ui/src/components/context/ContextSelectionSection.module.scss b/opendc-web/opendc-web-ui/src/components/context/ContextSelectionSection.module.css
index 0e902af0..0e902af0 100644
--- a/opendc-web/opendc-web-ui/src/components/context/ContextSelectionSection.module.scss
+++ b/opendc-web/opendc-web-ui/src/components/context/ContextSelectionSection.module.css
diff --git a/opendc-web/opendc-web-ui/src/components/context/ContextSelector.js b/opendc-web/opendc-web-ui/src/components/context/ContextSelector.js
index 059cfea8..d2601008 100644
--- a/opendc-web/opendc-web-ui/src/components/context/ContextSelector.js
+++ b/opendc-web/opendc-web-ui/src/components/context/ContextSelector.js
@@ -24,7 +24,7 @@ import PropTypes from 'prop-types'
import { ContextSelector as PFContextSelector, ContextSelectorItem } from '@patternfly/react-core'
import { useMemo, useState } from 'react'
-import styles from './ContextSelector.module.scss'
+import styles from './ContextSelector.module.css'
function ContextSelector({ id, type = 'page', toggleText, items, onSelect, onToggle, isOpen, isFullHeight }) {
const [searchValue, setSearchValue] = useState('')
diff --git a/opendc-web/opendc-web-ui/src/components/context/ContextSelector.module.scss b/opendc-web/opendc-web-ui/src/components/context/ContextSelector.module.css
index 4f86ac64..7662d00c 100644
--- a/opendc-web/opendc-web-ui/src/components/context/ContextSelector.module.scss
+++ b/opendc-web/opendc-web-ui/src/components/context/ContextSelector.module.css
@@ -21,7 +21,7 @@
*/
.pageSelector.pageSelector {
- // Ensure this selector has precedence over the default one
+ /* Ensure this selector has precedence over the default one */
margin-right: 20px;
--pf-c-context-selector__menu--ZIndex: var(--pf-global--ZIndex--lg);
@@ -31,16 +31,14 @@
--pf-c-context-selector__toggle--PaddingLeft: 0;
--pf-c-context-selector__toggle--BorderWidth: 0;
--pf-c-context-selector__toggle-text--FontSize: var(--pf-global--FontSize--sm);
+}
- & :global(.pf-c-context-selector__toggle) {
- &:active,
- &:focus-within,
- &:global(.pf-m-active) {
- --pf-c-context-selector__toggle--after--BorderBottomWidth: 0;
- }
- }
+.pageSelector.pageSelector :global(.pf-c-context-selector__toggle):active,
+.pageSelector.pageSelector :global(.pf-c-context-selector__toggle):focus-within,
+.pageSelector.pageSelector :global(.pf-c-context-selector__toggle):global(.pf-m-active) {
+ --pf-c-context-selector__toggle--after--BorderBottomWidth: 0;
+}
- &:global(.pf-m-expanded) > :global(.pf-c-context-selector__toggle) {
- --pf-c-context-selector__toggle--after--BorderBottomWidth: 0;
- }
+.pageSelector.pageSelector:global(.pf-m-expanded) > :global(.pf-c-context-selector__toggle) {
+ --pf-c-context-selector__toggle--after--BorderBottomWidth: 0;
}