Skip to content

Commit f1abec9

Browse files
committed
css added
1 parent 48b2d13 commit f1abec9

File tree

1 file changed

+134
-93
lines changed

1 file changed

+134
-93
lines changed

build/media_source/com_workflow/scss/components/_workflow-graph-custom.scss

Lines changed: 134 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,22 @@
44
background-size: 20px 20px;
55
}
66

7-
.min-vh-80 {
8-
height: 80vh;
9-
}
10-
11-
.min-width-0 {
12-
min-width: 0;
13-
}
14-
15-
.h-40 {
16-
height: 40px;
17-
}
18-
19-
.end-20-px {
20-
right: 20px !important;
21-
}
22-
.top-25-px {
23-
top: 25px !important;
24-
}
25-
26-
.z-10 {
27-
z-index: 10;
28-
}
29-
30-
.z-20 {
31-
z-index: 20;
32-
}
7+
.min-vh-80 { height: 80vh; }
8+
.min-width-0 { min-width: 0; }
9+
.h-40 { height: 40px; }
10+
.end-20-px { right: 20px !important; }
11+
.top-25-px { top: 25px !important; }
12+
.z-10 { z-index: 10; }
13+
.z-20 { z-index: 20; }
3314

3415
/* ----- Edges ----- */
3516
.vue-flow__edge-path {
3617
stroke-width: 2;
3718
transition: stroke .2s ease, stroke-width .2s ease;
3819
}
39-
40-
.vue-flow__edge.selected .vue-flow__edge-path {
41-
stroke: var(--primary);
42-
stroke-width: 3;
43-
}
44-
20+
.vue-flow__edge.selected .vue-flow__edge-path,
4521
.vue-flow__edge:hover .vue-flow__edge-path {
22+
stroke: var(--primary);
4623
stroke-width: 3;
4724
}
4825

@@ -57,7 +34,6 @@
5734
border: 1px solid var(--border);
5835
border-radius: 4px;
5936
}
60-
6137
.vue-flow__edge-label:hover {
6238
background: var(--gray-100);
6339
border-color: var(--gray-400);
@@ -70,23 +46,14 @@
7046
}
7147

7248
/* ----- Nodes ----- */
73-
.stage-node {
74-
position: relative;
75-
}
76-
49+
.stage-node { position: relative; }
7750
.stage-node .edge-handler {
7851
width: 12px !important;
7952
height: 12px !important;
8053
background: var(--vf-node-text);
8154
}
82-
83-
.stage-node:hover .vue-flow__handle {
84-
opacity: 1;
85-
}
86-
87-
.vue-flow__node-stage {
88-
max-width: 250px !important;
89-
}
55+
.stage-node:hover .vue-flow__handle { opacity: 1; }
56+
.vue-flow__node-stage { max-width: 250px !important; }
9057

9158
/* ----- Handle ----- */
9259
.vue-flow__handle {
@@ -99,7 +66,6 @@
9966
background-color: #000;
10067
box-shadow: 0 4px 10px rgba(0, 0, 0, .6);
10168
}
102-
10369
.stage-card-actions button {
10470
--btn-padding-x: 2px !important;
10571
--btn-padding-y: 0 !important;
@@ -113,53 +79,128 @@
11379
line-clamp: 2;
11480
}
11581

116-
/* ----- Accessibility ----- */
117-
.sr-only,
82+
/* ----- Accessibility Utilities ----- */
11883
.visually-hidden {
84+
position: absolute !important;
85+
width: 1px !important;
86+
height: 1px !important;
87+
padding: 0 !important;
88+
margin: -1px !important;
89+
overflow: hidden !important;
90+
clip: rect(0, 0, 0, 0) !important;
91+
white-space: nowrap !important;
92+
border: 0 !important;
93+
}
94+
95+
/* Focus indicators */
96+
:focus {
97+
outline: 3px solid #005fcc !important;
98+
outline-offset: 3px !important;
99+
box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.4) !important;
100+
}
101+
102+
/* Skip links */
103+
.skip-link {
119104
position: absolute;
120-
width: 1px;
121-
height: 1px;
122-
padding: 0;
123-
margin: -1px;
124-
overflow: hidden;
125-
clip: rect(0, 0, 0, 0);
126-
border: 0;
127-
}
128-
129-
/* ----- Custom Controls ----- */
130-
.custom-controls {
131-
position: absolute;
132-
right: 20px;
133-
bottom: 20px;
134-
display: flex;
135-
flex-direction: column;
136-
gap: 1px;
137-
padding: 2px;
138-
color: var(--black);
139-
background-color: var(--backdrop-bg);
140-
border-radius: 4px;
141-
box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
142-
}
143-
144-
.custom-controls-button {
145-
display: flex;
146-
align-items: center;
147-
justify-content: center;
148-
width: 32px;
149-
height: 32px;
150-
padding: 0;
151-
color: var(--primary);
152-
cursor: pointer;
153-
background-color: var(--bg-normal);
154-
border: 1px solid var(--border);
155-
border-radius: 4px;
156-
}
157-
158-
.custom-controls-button:hover {
159-
background-color: var(--bg-reverted);
160-
}
161-
162-
.custom-controls-button.active {
163-
color: var(--white);
164-
background-color: var(--primary);
105+
top: -40px;
106+
left: 6px;
107+
background: #0d6efd;
108+
color: #fff;
109+
padding: 8px;
110+
text-decoration: none;
111+
border-radius: 3px;
112+
z-index: 9999;
113+
transition: top 0.3s;
114+
}
115+
.skip-link:focus { top: 6px; }
116+
/* Ensure child elements inside groups remain usable */
117+
.vue-flow [role="group"] {
118+
pointer-events: none !important;
119+
user-select: none;
120+
}
121+
.vue-flow [role="group"] > * {
122+
pointer-events: auto;
123+
}
124+
125+
/* ----- Color Contrast for Badges ----- */
126+
.badge.bg-warning { color: #000; }
127+
.badge.bg-success,
128+
.badge.bg-danger { color: #fff; }
129+
130+
/* Add icons + text indicators */
131+
.badge.bg-success::before { content: ""; font-weight: bold; }
132+
.badge.bg-danger::before { content: ""; font-weight: bold; }
133+
.badge.bg-warning::before { content: ""; font-weight: bold; }
134+
135+
/* Stage-node states */
136+
.stage-node[data-published="true"] { border-left: 6px solid #28a745 !important; }
137+
.stage-node[data-published="false"] { border-left: 6px dashed #dc3545 !important; }
138+
.stage-node[data-default="true"] {
139+
border: 4px double #ffc107 !important;
140+
background-image: repeating-linear-gradient(
141+
45deg, transparent, transparent 10px,
142+
rgba(255,193,7,.1) 10px, rgba(255,193,7,.1) 20px
143+
) !important;
144+
}
145+
146+
/* ----- High Contrast Mode ----- */
147+
@media (prefers-contrast: high), (forced-colors: active), screen and (-ms-high-contrast: active) {
148+
.stage-node,
149+
.edge-label,
150+
.workflow-browser-actions-list,
151+
.custom-controls-button,
152+
.badge {
153+
border: 2px solid ButtonText !important;
154+
background: ButtonFace !important;
155+
color: ButtonText !important;
156+
forced-color-adjust: none !important;
157+
}
158+
:focus {
159+
outline: 3px solid Highlight !important;
160+
background: Highlight !important;
161+
color: HighlightText !important;
162+
}
163+
}
164+
165+
/* ----- Reduced Motion ----- */
166+
@media (prefers-reduced-motion: reduce) {
167+
*, *::before, *::after {
168+
transition: none !important;
169+
animation: none !important;
170+
scroll-behavior: auto !important;
171+
}
172+
}
173+
174+
/* ----- Touch Targets ----- */
175+
@media (pointer: coarse) {
176+
button,
177+
[role="button"],
178+
[role="menuitem"],
179+
.stage-node,
180+
.edge-label,
181+
.custom-controls-button {
182+
min-height: 48px !important;
183+
min-width: 48px !important;
184+
padding: 14px 18px !important;
185+
}
186+
}
187+
188+
/* ----- Print Styles ----- */
189+
@media print {
190+
.stage-node,
191+
.edge-label {
192+
background: #fff !important;
193+
color: #000 !important;
194+
border: 2px solid #000 !important;
195+
box-shadow: none !important;
196+
}
197+
.workflow-browser-actions-list,
198+
.stage-card-actions,
199+
.vue-flow__controls,
200+
.custom-controls { display: none !important; }
201+
.badge::after {
202+
content: " (" attr(title) ")" !important;
203+
font-size: 11px !important;
204+
font-style: italic !important;
205+
}
165206
}

0 commit comments

Comments
 (0)