3x-ui/frontend/src/styles/page-cards.css
MHSanaei 7e5f279284
refactor(frontend): drop CustomStatistic wrapper, move overrides to theme tokens
- Delete `<CustomStatistic>` (a pass-through wrapper over <Statistic>)
  and its unscoped global `.ant-statistic-*` CSS overrides; consumers
  (IndexPage, ClientsPage, InboundsPage, NodesPage) now import AntD
  `<Statistic>` directly.
- Add Statistic component tokens to ConfigProvider so the title (11px)
  and content (17px) font sizes still apply, without `!important`
  global selectors.
- Move dark / ultra-dark card border colours from `body.dark .ant-card`
  + `html[data-theme='ultra-dark'] .ant-card` selectors into Card
  `colorBorderSecondary` tokens; page-cards.css now only carries the
  custom radius/shadow/transition that has no token equivalent.
- Simplify XrayStatusCard badge: remove the custom `xray-pulse` dot
  keyframe and per-state ring-colour overrides; AntD `<Badge
  status="processing" color={…}>` already pulses the ring in the same
  colour, no extra CSS needed.
2026-05-25 03:47:49 +02:00

80 lines
3 KiB
CSS

.index-page .ant-card,
.clients-page .ant-card,
.inbounds-page .ant-card,
.xray-page .ant-card,
.settings-page .ant-card,
.nodes-page .ant-card,
.api-docs-page .ant-card {
border-radius: 12px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}
body.dark .index-page .ant-card,
body.dark .clients-page .ant-card,
body.dark .inbounds-page .ant-card,
body.dark .xray-page .ant-card,
body.dark .settings-page .ant-card,
body.dark .nodes-page .ant-card,
body.dark .api-docs-page .ant-card {
box-shadow:
0 1px 2px rgba(0, 0, 0, 0.4),
inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
html[data-theme='ultra-dark'] .index-page .ant-card,
html[data-theme='ultra-dark'] .clients-page .ant-card,
html[data-theme='ultra-dark'] .inbounds-page .ant-card,
html[data-theme='ultra-dark'] .xray-page .ant-card,
html[data-theme='ultra-dark'] .settings-page .ant-card,
html[data-theme='ultra-dark'] .nodes-page .ant-card,
html[data-theme='ultra-dark'] .api-docs-page .ant-card {
box-shadow:
0 1px 2px rgba(0, 0, 0, 0.6),
inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.index-page .ant-card.ant-card-hoverable:hover,
.clients-page .ant-card.ant-card-hoverable:hover,
.inbounds-page .ant-card.ant-card-hoverable:hover,
.xray-page .ant-card.ant-card-hoverable:hover,
.settings-page .ant-card.ant-card-hoverable:hover,
.nodes-page .ant-card.ant-card-hoverable:hover,
.api-docs-page .ant-card.ant-card-hoverable:hover {
transform: translateY(-2px);
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
body.dark .index-page .ant-card.ant-card-hoverable:hover,
body.dark .clients-page .ant-card.ant-card-hoverable:hover,
body.dark .inbounds-page .ant-card.ant-card-hoverable:hover,
body.dark .xray-page .ant-card.ant-card-hoverable:hover,
body.dark .settings-page .ant-card.ant-card-hoverable:hover,
body.dark .nodes-page .ant-card.ant-card-hoverable:hover,
body.dark .api-docs-page .ant-card.ant-card-hoverable:hover {
box-shadow:
0 8px 24px rgba(0, 0, 0, 0.5),
inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
html[data-theme='ultra-dark'] .index-page .ant-card.ant-card-hoverable:hover,
html[data-theme='ultra-dark'] .clients-page .ant-card.ant-card-hoverable:hover,
html[data-theme='ultra-dark'] .inbounds-page .ant-card.ant-card-hoverable:hover,
html[data-theme='ultra-dark'] .xray-page .ant-card.ant-card-hoverable:hover,
html[data-theme='ultra-dark'] .settings-page .ant-card.ant-card-hoverable:hover,
html[data-theme='ultra-dark'] .nodes-page .ant-card.ant-card-hoverable:hover,
html[data-theme='ultra-dark'] .api-docs-page .ant-card.ant-card-hoverable:hover {
box-shadow:
0 8px 24px rgba(0, 0, 0, 0.75),
inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.index-page .ant-card .ant-card-actions,
.clients-page .ant-card .ant-card-actions,
.inbounds-page .ant-card .ant-card-actions,
.xray-page .ant-card .ant-card-actions,
.settings-page .ant-card .ant-card-actions,
.nodes-page .ant-card .ant-card-actions,
.api-docs-page .ant-card .ant-card-actions {
background: transparent;
}