| 1 |
/** |
| 2 |
* OpenStation — Recycle Bin window styles. |
| 3 |
* |
| 4 |
* Scoped to `.desktop-mode-recycle-bin` so the rules can't leak into other |
| 5 |
* windows. Layout: a sticky toolbar across the top, then a flex-1 |
| 6 |
* body that hosts a `<os-table>`. The table is told to size to the |
| 7 |
* body via `--os-ui-table-max-height: 100%` so its sticky header |
| 8 |
* engages. |
| 9 |
*/ |
| 10 |
|
| 11 |
.desktop-mode-recycle-bin { |
| 12 |
display: flex; |
| 13 |
flex-direction: column; |
| 14 |
height: 100%; |
| 15 |
width: 100%; |
| 16 |
background: var( --os-ui-surface, #fff ); |
| 17 |
color: var( --os-ui-fg, #1d2327 ); |
| 18 |
} |
| 19 |
|
| 20 |
.os-recycle-bin__toolbar { |
| 21 |
display: flex; |
| 22 |
flex-wrap: wrap; |
| 23 |
align-items: center; |
| 24 |
gap: 12px; |
| 25 |
padding: 10px 14px; |
| 26 |
border-bottom: 1px solid var( --os-ui-border, rgba( 0, 0, 0, 0.08 ) ); |
| 27 |
background: var( --os-ui-surface-elevated, #f6f7f7 ); |
| 28 |
} |
| 29 |
|
| 30 |
.os-recycle-bin__toolbar-left, |
| 31 |
.os-recycle-bin__toolbar-right, |
| 32 |
.os-recycle-bin__toolbar-trailing { |
| 33 |
display: flex; |
| 34 |
align-items: center; |
| 35 |
gap: 8px; |
| 36 |
} |
| 37 |
|
| 38 |
/* |
| 39 |
* Honour the `hidden` attribute. The browser's UA stylesheet |
| 40 |
* sets `[hidden] { display: none }`, but our explicit |
| 41 |
* `display: flex` above wins on specificity. This rule restores |
| 42 |
* the expected behaviour so `bulk.hidden = true` from JS |
| 43 |
* actually hides the bulk action group when nothing is selected. |
| 44 |
*/ |
| 45 |
.os-recycle-bin__toolbar-right[hidden] { |
| 46 |
display: none; |
| 47 |
} |
| 48 |
|
| 49 |
.os-recycle-bin__toolbar-trailing { |
| 50 |
margin-inline-start: auto; |
| 51 |
} |
| 52 |
|
| 53 |
.os-recycle-bin__count { |
| 54 |
font-size: 12px; |
| 55 |
font-weight: 600; |
| 56 |
color: var( --os-ui-fg-muted, #50575e ); |
| 57 |
font-variant-numeric: tabular-nums; |
| 58 |
padding-inline-end: 4px; |
| 59 |
} |
| 60 |
|
| 61 |
.os-recycle-bin__body { |
| 62 |
flex: 1 1 auto; |
| 63 |
min-height: 0; |
| 64 |
display: flex; |
| 65 |
padding: 8px 12px 12px; |
| 66 |
} |
| 67 |
|
| 68 |
.os-recycle-bin__body os-table { |
| 69 |
flex: 1 1 auto; |
| 70 |
--os-ui-table-max-height: 100%; |
| 71 |
} |
| 72 |
|
| 73 |
/* |
| 74 |
* NOTE — cell-content styles are now inlined in `src/recycle-bin/ |
| 75 |
* index.ts`. `<os-table>` renders into its own shadow DOM, which |
| 76 |
* blocks document-level stylesheets (and Dashicons) from reaching |
| 77 |
* any node we return from a `column.render` callback. The empty- |
| 78 |
* state, toolbar, and body styles below remain CSS because they |
| 79 |
* live in the bin window's light-DOM template. |
| 80 |
*/ |
| 81 |
|
| 82 |
.os-recycle-bin__empty { |
| 83 |
display: flex; |
| 84 |
flex-direction: column; |
| 85 |
align-items: center; |
| 86 |
gap: 8px; |
| 87 |
padding: 32px 16px; |
| 88 |
color: var( --os-ui-fg-muted, #50575e ); |
| 89 |
text-align: center; |
| 90 |
} |
| 91 |
|
| 92 |
.os-recycle-bin__empty .dashicons { |
| 93 |
font-size: 32px; |
| 94 |
width: 32px; |
| 95 |
height: 32px; |
| 96 |
opacity: 0.6; |
| 97 |
} |
| 98 |
|
| 99 |
.os-recycle-bin__empty-hint { |
| 100 |
font-size: 12px; |
| 101 |
max-width: 360px; |
| 102 |
} |
| 103 |
|
| 104 |
/* |
| 105 |
* Drop-target highlight for cross-window drag-to-trash. Set when |
| 106 |
* the desktop drag handler hit-tests the cursor over the bin's |
| 107 |
* root via `data-os-trash-drop-active`. Returns to |
| 108 |
* normal on pointer-up or when the cursor leaves the window. |
| 109 |
*/ |
| 110 |
.desktop-mode-recycle-bin[ data-os-trash-drop-active ] { |
| 111 |
position: relative; |
| 112 |
box-shadow: inset 0 0 0 2px var( --wp-admin-theme-color, #2271b1 ); |
| 113 |
transition: box-shadow 80ms ease; |
| 114 |
} |
| 115 |
|
| 116 |
/* Dock-icon variant: when the recycle-bin window is closed, the |
| 117 |
* desktop drag handler highlights the dock tile instead. Same |
| 118 |
* affordance — outline + faint tint — so the user reads the icon |
| 119 |
* as a valid drop target without needing to open the window |
| 120 |
* first. The selector matches the dock tile's `data-system-id` |
| 121 |
* so this CSS applies wherever the recycle-bin dock entry |
| 122 |
* renders (left rail, bottom rail, future placements). */ |
| 123 |
.os-dock__item[ data-system-id="desktop-mode-recycle-bin" ][ data-os-trash-drop-active ] { |
| 124 |
outline: 2px solid var( --wp-admin-theme-color, #2271b1 ); |
| 125 |
outline-offset: 2px; |
| 126 |
border-radius: 12px; |
| 127 |
background: color-mix( |
| 128 |
in srgb, |
| 129 |
var( --wp-admin-theme-color, #2271b1 ) 14%, |
| 130 |
transparent |
| 131 |
); |
| 132 |
transition: |
| 133 |
outline-color 80ms ease, |
| 134 |
background 80ms ease; |
| 135 |
} |
| 136 |
|
| 137 |
.desktop-mode-recycle-bin[ data-os-trash-drop-active ]::before { |
| 138 |
content: ''; |
| 139 |
position: absolute; |
| 140 |
inset: 0; |
| 141 |
pointer-events: none; |
| 142 |
background: color-mix( |
| 143 |
in srgb, |
| 144 |
var( --wp-admin-theme-color, #2271b1 ) 8%, |
| 145 |
transparent |
| 146 |
); |
| 147 |
z-index: 1; |
| 148 |
} |
| 149 |
|
| 150 |
.desktop-mode-recycle-bin[ data-os-trash-drop-active ]::after { |
| 151 |
content: '🗑 Drop to move to Trash'; |
| 152 |
position: absolute; |
| 153 |
left: 50%; |
| 154 |
top: 50%; |
| 155 |
transform: translate( -50%, -50% ); |
| 156 |
padding: 10px 18px; |
| 157 |
border-radius: 999px; |
| 158 |
background: var( --wp-admin-theme-color, #2271b1 ); |
| 159 |
color: var( --os-ui-fg-on-accent, #fff ); |
| 160 |
font-weight: 600; |
| 161 |
font-size: 13px; |
| 162 |
letter-spacing: 0.2px; |
| 163 |
box-shadow: 0 8px 24px rgba( 0, 0, 0, 0.18 ); |
| 164 |
pointer-events: none; |
| 165 |
z-index: 2; |
| 166 |
} |
| 167 |
|