@@ -17,109 +17,50 @@ limitations under the License.
1717/* stylelint-disable */
1818
1919/**
20- * Scope all Cryostat styles to prevent conflicts with OpenShift Console.
21- * All Cryostat UI content should be wrapped in an element with class 'cryostat-app'.
20+ * Plugin-specific CSS overrides for Cryostat when embedded in OpenShift Console
21+ *
22+ * These styles fix layout issues that occur when Cryostat is embedded as a plugin,
23+ * while maintaining compatibility with the standalone Cryostat UI.
2224 */
23- .cryostat-app {
24- /**
25- * Reset the height property of pf-v6-c-drawer__body (overridden by OpenShift console to 100%)
26- * The topology detail panel relies on flex box property to make the content body fill vertical space and allow scrolling if overflow.
27- * Setting height to 100% breaks the view since the header takes all vertical space instead, resulting no space for body.
28- */
29- .topology__main-container .pf-v6-c-drawer__body {
30- height : unset;
31- }
32- }
3325
3426/**
35- * Defensive rules: Ensure no Cryostat styles leak globally.
36- * These rules revert any styles that might be applied outside the .cryostat-app scope.
37- * This is a safety measure in case styles are accidentally injected globally.
27+ * Fix: Cryostat container height in embedded context
28+ *
29+ * Problem: cryostat-web sets `height: 100%` on .cryostat-app, which works in standalone
30+ * mode but breaks when embedded in Console's layout structure.
31+ *
32+ * Solution: Override to use min-height and flex properties for proper embedded layout.
3833 */
39-
40- /* Topology layout containers */
41- : not (.cryostat-app ) .pf-topology-content ,
42- : not (.cryostat-app ) .pf-topology-container ,
43- : not (.cryostat-app ) .pf-topology-container__with-sidebar ,
44- : not (.cryostat-app ) .pf-topology-side-bar ,
45- : not (.cryostat-app ) .pf-topology-resizable-side-bar ,
46- : not (.cryostat-app ) .pf-topology-control-bar ,
47- : not (.cryostat-app ) .pf-topology-control-bar__button ,
48- : not (.cryostat-app ) .pf-topology-visualization-surface ,
49- : not (.cryostat-app ) .pf-topology-visualization-surface__svg {
50- all : revert !important ;
51- }
52-
53- /* Topology nodes and edges */
54- : not (.cryostat-app ) .pf-topology__node ,
55- : not (.cryostat-app ) .pf-topology__node__action-icon ,
56- : not (.cryostat-app ) .pf-topology__node__action-icon__icon ,
57- : not (.cryostat-app ) .pf-topology__edge ,
58- : not (.cryostat-app ) .pf-topology__edge__link ,
59- : not (.cryostat-app ) .pf-topology-connector-arrow ,
60- : not (.cryostat-app ) .pf-topology-default-create-connector ,
61- : not (.cryostat-app ) .pf-topology-default-create-connector__line ,
62- : not (.cryostat-app ) .pf-topology-default-create-connector__arrow ,
63- : not (.cryostat-app ) .pf-topology-default-create-connector__create ,
64- : not (.cryostat-app ) .pf-topology-default-create-connector__create__bg ,
65- : not (.cryostat-app ) .pf-topology-default-create-connector__create__cursor ,
66- : not (.cryostat-app ) .pf-topology-area-select-rect {
67- all : revert !important ;
68- }
69-
70- /* Topology pipelines (if used by Console) */
71- : not (.cryostat-app ) .pf-topology-pipelines__pill ,
72- : not (.cryostat-app ) .pf-topology-pipelines__pill-background ,
73- : not (.cryostat-app ) .pf-topology-pipelines__pill-text ,
74- : not (.cryostat-app ) .pf-topology-pipelines__pill-status ,
75- : not (.cryostat-app ) .pf-topology-pipelines__pill-badge ,
76- : not (.cryostat-app ) .pf-topology-pipelines__status-icon ,
77- : not (.cryostat-app ) .pf-topology-pipelines__status-icon-background ,
78- : not (.cryostat-app ) .pf-topology-pipelines__when-expression-background ,
79- : not (.cryostat-app ) .pf-topology-pipelines__when-expression-edge {
80- all : revert !important ;
81- }
82-
83- /* Topology context menus */
84- : not (.cryostat-app ) .pf-topology-context-menu__c-dropdown__menu ,
85- : not (.cryostat-app ) .pf-topology-context-sub-menu ,
86- : not (.cryostat-app ) .pf-topology-context-sub-menu__container ,
87- : not (.cryostat-app ) .pf-topology-context-sub-menu__arrow {
88- all : revert !important ;
34+ .cryostat-app {
35+ height : auto !important ;
36+ min-height : 100% ;
37+ display : flex;
38+ flex-direction : column;
39+ flex : 1 ;
8940}
9041
91- /* Cryostat-specific topology classes */
92- : not (.cryostat-app ) .sample-node-donut__node-wrapper ,
93- : not (.cryostat-app ) .sample-node-donut__node-icon ,
94- : not (.cryostat-app ) .sample-node-donut__status-indicator ,
95- : not (.cryostat-app ) .sample-node-donut__node-label ,
96- : not (.cryostat-app ) .sample-node-donut__node-label-badge ,
97- : not (.cryostat-app ) .empty-text ,
98- : not (.cryostat-app ) .entity-overview ,
99- : not (.cryostat-app ) .entity-overview__wrapper ,
100- : not (.cryostat-app ) .entity-overview__displayed-keyvalues-wrapper ,
101- : not (.cryostat-app ) .entity-overview__displayed-annotations ,
102- : not (.cryostat-app ) .entity-overview__entity-title-wrapper ,
103- : not (.cryostat-app ) .entity-overview__entity-title-badge ,
104- : not (.cryostat-app ) .entity-overview__entity-close-button ,
105- : not (.cryostat-app ) .entity-overview__alert-banner ,
106- : not (.cryostat-app ) .entity-overview__header ,
107- : not (.cryostat-app ) .topology-listview__realm-title ,
108- : not (.cryostat-app ) .topology__help-icon ,
109- : not (.cryostat-app ) .topology__help-icon-button {
110- all : revert !important ;
42+ /**
43+ * Fix: Cryostat logo width on About page
44+ *
45+ * Problem: cryostat-web only constrains logo height (2em), allowing width to expand to full container.
46+ *
47+ * Solution: Add max-width constraint to keep logo at reasonable size.
48+ */
49+ .cryostat-app .cryostat-logo {
50+ max-width : 300px !important ;
51+ width : auto !important ;
11152}
11253
113- /* Other Cryostat-specific classes */
114- : not (. cryostat-app ) . cryostat-text ,
115- : not (. cryostat-app ) . cryostat-logo ,
116- : not (. cryostat-app ) . automated-analysis-card ,
117- : not (. cryostat-app ) . dashboard-card ,
118- : not (. cryostat-app ) . dashboard-card-preview ,
119- : not (. cryostat-app ) . recording-table-outer-container ,
120- : not (. cryostat-app ) . archive-table-outer-container ,
121- : not ( .cryostat-app ) . rules-table-outer-container {
122- all : revert !important ;
54+ /**
55+ * Fix: Topology detail panel in Cryostat's topology view
56+ *
57+ * Problem: Console overrides pf-v6-c-drawer__body height to 100%, breaking Cryostat's
58+ * topology detail panel which relies on flexbox for proper scrolling.
59+ *
60+ * Solution: Reset height to allow flexbox layout to work correctly.
61+ */
62+ .cryostat-app . topology__main-container . pf-v6-c-drawer__body {
63+ height : unset ;
12364}
12465
125- /* stylelint-enable */
66+ /* stylelint-enable */
0 commit comments