Files
Edu/apps/portal-shell/tailwind.config.js
SpecialX 514e26ebb4 feat(portal-shell): implement portal-shell with apollo-router integration
M8: portal-shell unified frontend shell (Modular Monolith + micro-kernel).

- Apollo Client -> apollo-router (port 4010, RSC prefetch)

- 5 layouts: classic/focus/split/triple/canvas

- Registry + PluginLoader (dynamic import ssr:false)

- 3-layer props merge, Zustand PluginStore

- 4 widgets: grades/notification-bell/user-menu/class-selector

- config-service: new pluginConfig GraphQL resolver

- apollo-router: CORS + header propagation for portal-shell

- docker-compose.yml: portal-shell service block
2026-07-15 08:06:09 +08:00

84 lines
2.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Tailwind 配置 - 对齐三层设计令牌
*
* Layer 3 映射:将 Layer 2 Semantic CSS 变量暴露为 Tailwind 类名
* 业务代码使用 bg-paper / text-ink / font-serif 等语义类
*
* 禁止:
* - 禁止 hex 字面量colors 引用 var(--*)
* - 禁止字体名字面量fontFamily 引用 var(--font-family-*))
*/
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {
colors: {
paper: "var(--bg-paper)",
surface: "var(--bg-surface)",
subtle: "var(--bg-subtle)",
ink: {
DEFAULT: "var(--color-ink)",
muted: "var(--color-ink-muted)",
subtle: "var(--color-ink-subtle)",
onAccent: "var(--color-ink-on-accent)",
},
accent: {
DEFAULT: "var(--color-accent)",
hover: "var(--color-accent-hover)",
subtle: "var(--color-accent-subtle)",
},
rule: {
DEFAULT: "var(--color-rule)",
strong: "var(--color-rule-strong)",
},
success: "var(--color-success)",
warning: "var(--color-warning)",
danger: "var(--color-danger)",
info: "var(--color-info)",
border: "var(--color-border)",
},
fontFamily: {
sans: "var(--font-family-sans)",
serif: "var(--font-family-serif)",
mono: "var(--font-family-mono)",
},
fontSize: {
body: "var(--font-size-body)",
small: "var(--font-size-small)",
tiny: "var(--font-size-tiny)",
"heading-1": "var(--font-size-heading-1)",
"heading-2": "var(--font-size-heading-2)",
"heading-3": "var(--font-size-heading-3)",
display: "var(--font-size-display)",
"large-number": "var(--font-size-large-number)",
},
spacing: {
xs: "var(--space-xs)",
sm: "var(--space-sm)",
md: "var(--space-md)",
lg: "var(--space-lg)",
xl: "var(--space-xl)",
"2xl": "var(--space-2xl)",
},
borderRadius: {
DEFAULT: "var(--radius-default)",
card: "var(--radius-card)",
button: "var(--radius-button)",
},
boxShadow: {
sm: "var(--shadow-sm)",
md: "var(--shadow-md)",
lg: "var(--shadow-lg)",
xl: "var(--shadow-xl)",
},
transitionDuration: {
fast: "150ms",
normal: "200ms",
},
},
},
plugins: [],
};