init
This commit is contained in:
59
ui/theme/typography.slint
Normal file
59
ui/theme/typography.slint
Normal file
@@ -0,0 +1,59 @@
|
||||
// Typography System
|
||||
// Font sizes, weights, and line heights following shadcn design principles
|
||||
|
||||
// Font size scale
|
||||
export struct FontSizes {
|
||||
xs: length,
|
||||
sm: length,
|
||||
base: length,
|
||||
lg: length,
|
||||
xl: length,
|
||||
xl2: length,
|
||||
xl3: length,
|
||||
xl4: length,
|
||||
}
|
||||
|
||||
// Font weight scale
|
||||
export struct FontWeights {
|
||||
normal: int,
|
||||
medium: int,
|
||||
semibold: int,
|
||||
bold: int,
|
||||
}
|
||||
|
||||
// Line height scale
|
||||
export struct LineHeights {
|
||||
tight: float,
|
||||
normal: float,
|
||||
relaxed: float,
|
||||
}
|
||||
|
||||
// Global typography configuration
|
||||
export global Typography {
|
||||
// Font sizes (px)
|
||||
out property <FontSizes> sizes: {
|
||||
xs: 12px,
|
||||
sm: 14px,
|
||||
base: 16px,
|
||||
lg: 18px,
|
||||
xl: 20px,
|
||||
xl2: 24px,
|
||||
xl3: 30px,
|
||||
xl4: 36px,
|
||||
};
|
||||
|
||||
// Font weights
|
||||
out property <FontWeights> weights: {
|
||||
normal: 400,
|
||||
medium: 500,
|
||||
semibold: 600,
|
||||
bold: 700,
|
||||
};
|
||||
|
||||
// Line heights (relative)
|
||||
out property <LineHeights> line-heights: {
|
||||
tight: 1.25,
|
||||
normal: 1.5,
|
||||
relaxed: 1.75,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user