@ui0/theme 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.default.mjs +10 -1
- package/dist/config.default.mjs.map +1 -1
- package/dist/display.scss +0 -3
- package/dist/duration.scss +0 -10
- package/dist/{generate-Dey8zJEZ.mjs → generate-1VaquCh8.mjs} +34 -6
- package/dist/generate-1VaquCh8.mjs.map +1 -0
- package/dist/generator/cli.mjs +1 -1
- package/dist/generator/vite.d.mts.map +1 -1
- package/dist/generator/vite.mjs +13 -3
- package/dist/generator/vite.mjs.map +1 -1
- package/dist/index.d.mts +14 -8
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +25 -32
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/src/contracts/backdrop/backdrop.generator.ts +0 -2
- package/src/contracts/backdrop/index.ts +1 -1
- package/src/contracts/color/color.generator.ts +7 -0
- package/src/contracts/color/index.ts +1 -1
- package/src/contracts/contract.ts +5 -1
- package/src/contracts/disabled/index.ts +1 -1
- package/src/contracts/display/display.contract.ts +11 -22
- package/src/contracts/display/display.scss +0 -3
- package/src/contracts/display/index.ts +1 -1
- package/src/contracts/duration/duration.generator.spec.ts +15 -0
- package/src/contracts/duration/duration.generator.ts +40 -0
- package/src/contracts/duration/duration.keys.ts +4 -0
- package/src/{styles → contracts/duration}/duration.scss +0 -10
- package/src/contracts/duration/duration.types.ts +16 -0
- package/src/contracts/duration/duration.util.ts +12 -0
- package/src/contracts/duration/index.ts +13 -0
- package/src/contracts/elevation/index.ts +1 -1
- package/src/contracts/index.ts +3 -1
- package/src/contracts/round/index.ts +1 -1
- package/src/contracts/round/round.types.ts +1 -1
- package/src/contracts/size/index.ts +1 -1
- package/src/contracts/typography/index.ts +4 -5
- package/src/contracts/typography/typography.generator.spec.ts +7 -5
- package/src/contracts/typography/typography.module.css +1 -1
- package/src/contracts/typography/typography.types.ts +1 -27
- package/src/generator/theme.default.css +12 -48
- package/dist/generate-Dey8zJEZ.mjs.map +0 -1
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
// class() re-exports the registry map plus the config-generated grid.
|
|
12
12
|
import type { CSSModuleClassList, RgbTuple, VarList } from '@ui0/types'
|
|
13
13
|
import type { ThemeContractGenerator } from '@ui0/types'
|
|
14
|
+
import { SPACES } from '@ui0/util'
|
|
14
15
|
|
|
15
16
|
import { buildPool, resolvePool } from '../../generator/pool'
|
|
16
17
|
import type { ContractFactory } from '../generator'
|
|
@@ -66,6 +67,12 @@ const colorGenerator: ContractFactory = (ctx): ThemeContractGenerator => {
|
|
|
66
67
|
const f: VarList = {}
|
|
67
68
|
if ('background' in base) f['cur-v'] = 'var(--0-c-background-v)'
|
|
68
69
|
f.cur = 'rgb(var(--0-f-cur-v, var(--0-c-background-v)) / var(--0-f-o, 1))'
|
|
70
|
+
// the background-relative contrast flip: same hsl lightness comparison
|
|
71
|
+
// the c/s ramps use - dark backgrounds read against white, light ones
|
|
72
|
+
// against black; nothing is emitted without a background to flip
|
|
73
|
+
if ('background' in base) {
|
|
74
|
+
c['theme-contrast-v'] = SPACES.hsl.lightnessOf(base.background) < 50 ? '255 255 255' : '0 0 0'
|
|
75
|
+
}
|
|
69
76
|
return { c, f }
|
|
70
77
|
}
|
|
71
78
|
|
|
@@ -5,7 +5,7 @@ import { colorDeal } from './color.contract'
|
|
|
5
5
|
import { ColorContractKey, ColorRefKey } from './color.keys'
|
|
6
6
|
import type { ColorProps, GradientProps, FillProps } from './color.types'
|
|
7
7
|
|
|
8
|
-
export { default as $
|
|
8
|
+
export { default as $color } from './color.module.css'
|
|
9
9
|
export type * from './color.types'
|
|
10
10
|
export * from './color.keys'
|
|
11
11
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { RegistryFlags } from '@ui0/shared'
|
|
1
2
|
import type { AnyProps, ClassList, CSSModuleClassList, Indexed, StyleList } from '@ui0/types'
|
|
2
3
|
import type { ContractProvider, ContractRefs, ThemeContract, ThemeContractName, Ui0ThemeContracts } from '@ui0/types'
|
|
3
4
|
import { isArray, isString } from '@ui0/util'
|
|
5
|
+
import { ThemeContractFlags } from '../constants'
|
|
4
6
|
function createProviderInstance(name: string, props?: Ui0ThemeContracts, styles?: CSSModuleClassList) {
|
|
5
7
|
const provider = {}
|
|
6
8
|
}
|
|
@@ -35,7 +37,9 @@ export class ThemeContractInstance implements ContractProvider {
|
|
|
35
37
|
if (isArray(name)) {
|
|
36
38
|
name.forEach((n) => {
|
|
37
39
|
if (contract.props?.includes(n)) {
|
|
38
|
-
|
|
40
|
+
if (contract.flag & ThemeContractFlags.dealer) {
|
|
41
|
+
jobs[contract.name] = contract.deal
|
|
42
|
+
}
|
|
39
43
|
}
|
|
40
44
|
})
|
|
41
45
|
} else if (isString(name)) {
|
|
@@ -5,7 +5,7 @@ import { disabledDeal } from './disabled.contract'
|
|
|
5
5
|
import { DisabledContractKey, DisabledRefKey } from './disabled.keys'
|
|
6
6
|
import type { DisabledProps } from './disabled.types'
|
|
7
7
|
|
|
8
|
-
export { default as $
|
|
8
|
+
export { default as $disabled } from './disabled.module.css'
|
|
9
9
|
export type * from './disabled.types'
|
|
10
10
|
export * from './disabled.keys'
|
|
11
11
|
|
|
@@ -7,34 +7,23 @@ import { mergeCssModulesStyles } from '@ui0/util'
|
|
|
7
7
|
import type { Ref } from 'vue'
|
|
8
8
|
|
|
9
9
|
import { EMPTY_OBJ } from '../../constants'
|
|
10
|
-
import type { DisplayProps } from './display.types'
|
|
11
10
|
|
|
12
11
|
import $display from './display.module.css'
|
|
13
12
|
|
|
14
|
-
// the prop -> class wiring: resolves the prop value to the hashed class from
|
|
15
|
-
// the module map (merged with the component's own $style)
|
|
16
|
-
function displayClasses(props: DisplayProps, styles?: CSSModuleClassList): ClassList {
|
|
17
|
-
const $ = mergeCssModulesStyles($display, styles)
|
|
18
|
-
const out: ClassList = []
|
|
19
|
-
if (props.display && $.displayed) out.push($.displayed)
|
|
20
|
-
return out
|
|
21
|
-
}
|
|
22
|
-
|
|
23
13
|
export function displayDeal(instance: ContractProvider): ThemeContractDeal {
|
|
24
|
-
const props = instance.props
|
|
25
|
-
|
|
26
14
|
return {
|
|
27
15
|
classes: () => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
16
|
+
return []
|
|
17
|
+
// if (!props.display) return instance.inject([])
|
|
18
|
+
//
|
|
19
|
+
// if (props.display === 'inherit') {
|
|
20
|
+
// const ctx = instance.context as Record<string, Ref<any> | undefined> | null
|
|
21
|
+
// if (ctx?.display) {
|
|
22
|
+
// return instance.inject(displayClasses({ display: ctx.display.value }, instance.$styles))
|
|
23
|
+
// }
|
|
24
|
+
// }
|
|
25
|
+
//
|
|
26
|
+
// return instance.inject(displayClasses(props as DisplayProps, instance.$styles))
|
|
38
27
|
},
|
|
39
28
|
styles: () => instance.inject(EMPTY_OBJ)
|
|
40
29
|
}
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
// Component-namespace wiring for the display contract: the generator emits
|
|
3
3
|
// `--0-display-base` on the theme blocks; this mixin mirrors it into the
|
|
4
4
|
// component namespace so a component can consume (and locally override) it.
|
|
5
|
-
@mixin use() {
|
|
6
|
-
--0c-display: var(--0-display-base, initial);
|
|
7
|
-
}
|
|
8
5
|
|
|
9
6
|
@mixin wh($width, $height) {
|
|
10
7
|
$max-w: ' and (max-width: #{$width})';
|
|
@@ -9,7 +9,7 @@ import { displayDeal } from './display.contract'
|
|
|
9
9
|
import { DisplayContractKey, DisplayRefKey } from './display.keys'
|
|
10
10
|
import type { DisplayProps } from './display.types'
|
|
11
11
|
|
|
12
|
-
export { default as $
|
|
12
|
+
export { default as $duration } from './display.module.css'
|
|
13
13
|
export type * from './display.types'
|
|
14
14
|
export * from './display.keys'
|
|
15
15
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
|
|
3
|
+
import { hashClassName } from '../../generator/hash'
|
|
4
|
+
import type { ThemePresetName } from '../../types'
|
|
5
|
+
import type { ContractContext } from '../generator'
|
|
6
|
+
import createDurationGenerator from './duration.generator'
|
|
7
|
+
|
|
8
|
+
const ctx = (config = {}): ContractContext => ({
|
|
9
|
+
presetName: 'test' as ThemePresetName,
|
|
10
|
+
config,
|
|
11
|
+
settings: {},
|
|
12
|
+
hash: hashClassName
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
describe('createDurationGenerator', () => {})
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { CSSModuleClassList, VarList, ThemeContractGenerator, StyleList } from '@ui0/types'
|
|
2
|
+
import { toUnits } from '@ui0/util'
|
|
3
|
+
|
|
4
|
+
import type { ContractContext, ContractFactory } from '../generator'
|
|
5
|
+
|
|
6
|
+
const durationGenerator: ContractFactory = (ctx: ContractContext): ThemeContractGenerator => {
|
|
7
|
+
const { settings } = ctx
|
|
8
|
+
|
|
9
|
+
function vars(): Record<string, VarList> {
|
|
10
|
+
const { duration } = settings
|
|
11
|
+
|
|
12
|
+
if (duration) {
|
|
13
|
+
return {
|
|
14
|
+
d: Object.fromEntries(Object.entries(duration).map(([k, v]) => [k, `${v}ms`]))
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return {}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
namespace: 'd',
|
|
22
|
+
vars: (scheme) => (scheme ? {} : vars()),
|
|
23
|
+
css: () => '',
|
|
24
|
+
class: (): CSSModuleClassList => ({}),
|
|
25
|
+
localScss: () => {
|
|
26
|
+
const dur = ctx.settings.duration
|
|
27
|
+
const out: StyleList = {}
|
|
28
|
+
|
|
29
|
+
if (dur) {
|
|
30
|
+
Object.keys(dur).forEach((k) => {
|
|
31
|
+
out[`$d-${k}`] = toUnits(dur[k], 'ms')
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
return out
|
|
35
|
+
},
|
|
36
|
+
styles: () => ({})
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default durationGenerator
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
@mixin use {
|
|
2
|
-
--0-d-superfast: 40ms;
|
|
3
|
-
--0-d-faster: 75ms;
|
|
4
|
-
--0-d-fast: 90ms;
|
|
5
|
-
--0-d-gently: 144ms;
|
|
6
|
-
--0-d-basic: 200ms;
|
|
7
|
-
--0-d-slow: 400ms;
|
|
8
|
-
--0-d-superslow: 1000ms;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
1
|
$duration-superfast: var(--0-d-superfast);
|
|
12
2
|
$duration-faster: var(--0-d-faster);
|
|
13
3
|
$duration-fast: var(--0-d-fast);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LiteralUnion, MaybeUnits } from '@ui0/types'
|
|
2
|
+
|
|
3
|
+
export type DurationProp = LiteralUnion<
|
|
4
|
+
'superslow' | 'fast' | 'slow' | 'basic' | 'gently' | 'faster' | 'superfast' | 'values'
|
|
5
|
+
>
|
|
6
|
+
|
|
7
|
+
export interface DurationThemeAppearanceConfig {}
|
|
8
|
+
|
|
9
|
+
declare module '@ui0/types/theme' {
|
|
10
|
+
interface Ui0ThemePresetAppearanceConfig {
|
|
11
|
+
duration?: DurationThemeAppearanceConfig
|
|
12
|
+
}
|
|
13
|
+
interface Ui0ThemeContractSettings {
|
|
14
|
+
duration?: Record<DurationProp, MaybeUnits>
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ThemeContract } from '@ui0/types'
|
|
2
|
+
|
|
3
|
+
import { ThemeContractFlags } from '../../constants'
|
|
4
|
+
import { DurationContractKey } from './duration.keys'
|
|
5
|
+
|
|
6
|
+
export type * from './duration.types'
|
|
7
|
+
export * from './duration.keys'
|
|
8
|
+
|
|
9
|
+
export const duration: ThemeContract = {
|
|
10
|
+
key: DurationContractKey,
|
|
11
|
+
name: 'duration',
|
|
12
|
+
flag: ThemeContractFlags.generator
|
|
13
|
+
}
|
|
@@ -5,7 +5,7 @@ import { elevationDeal } from './elevation.contract'
|
|
|
5
5
|
import { ElevationContractKey, ElevationRefKey } from './elevation.keys'
|
|
6
6
|
import type { ElevationProps } from './elevation.types'
|
|
7
7
|
|
|
8
|
-
export { default as $
|
|
8
|
+
export { default as $elevation } from './elevation.module.css'
|
|
9
9
|
export type * from './elevation.types'
|
|
10
10
|
export * from './elevation.keys'
|
|
11
11
|
export const ElevationPropsKeys: ReadonlyArray<keyof ElevationProps> = ['elevation']
|
package/src/contracts/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { backdrop, BackdropPropsKeys } from './backdrop'
|
|
|
4
4
|
import { color, ColorPropsKeys } from './color'
|
|
5
5
|
import { disabled, DisabledPropsKeys } from './disabled'
|
|
6
6
|
import { display } from './display'
|
|
7
|
+
import { duration } from './duration'
|
|
7
8
|
import { elevation, ElevationPropsKeys } from './elevation'
|
|
8
9
|
import { round, RoundPropsKeys } from './round'
|
|
9
10
|
import { size, SizePropsKeys } from './size'
|
|
@@ -21,13 +22,14 @@ export const contracts: Record<ThemeContractName, ThemeContract> = {
|
|
|
21
22
|
backdrop,
|
|
22
23
|
round,
|
|
23
24
|
elevation,
|
|
25
|
+
duration,
|
|
24
26
|
style,
|
|
25
27
|
disabled,
|
|
26
28
|
display,
|
|
27
29
|
typography,
|
|
28
30
|
size
|
|
29
31
|
}
|
|
30
|
-
export const props = [
|
|
32
|
+
export const props: Array<string> = [
|
|
31
33
|
ColorPropsKeys,
|
|
32
34
|
RoundPropsKeys,
|
|
33
35
|
SizePropsKeys,
|
|
@@ -5,7 +5,7 @@ import { roundDeal } from './round.contract'
|
|
|
5
5
|
import { RoundContractKey, RoundRefKey } from './round.keys'
|
|
6
6
|
import type { RoundProps } from './round.types'
|
|
7
7
|
|
|
8
|
-
export { default as $
|
|
8
|
+
export { default as $round } from './round.module.css'
|
|
9
9
|
export type * from './round.types'
|
|
10
10
|
export * from './round.keys'
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ import { sizeDeal } from './size.contract'
|
|
|
5
5
|
import { SizeContractKey, SizeRefKey } from './size.keys'
|
|
6
6
|
import type { DensityProps, SizeProps } from './size.types'
|
|
7
7
|
|
|
8
|
-
export { default as $
|
|
8
|
+
export { default as $size } from './size.module.css'
|
|
9
9
|
export type * from './size.types'
|
|
10
10
|
export * from './size.keys'
|
|
11
11
|
export { default as sizeGenerator } from './size.generator'
|
|
@@ -2,19 +2,18 @@
|
|
|
2
2
|
// packages/templates/contract. Wiring left (see the generator output):
|
|
3
3
|
// 1. add `typography` to src/contracts/index.ts (next to round/size/...)
|
|
4
4
|
// 2. add typographyGenerator to src/generator.ts (contractGenerators)
|
|
5
|
+
import type { ThemeContract } from '@ui0/types'
|
|
6
|
+
|
|
5
7
|
import { ThemeContractFlags } from '../../constants'
|
|
6
|
-
import type { ThemeContract } from '../../types'
|
|
7
8
|
import { typographyDeal } from './typography.contract'
|
|
8
9
|
import { TypographyContractKey, TypographyRefKey } from './typography.keys'
|
|
9
10
|
import type { TypographyProps } from './typography.types'
|
|
10
11
|
|
|
11
|
-
export { default as $
|
|
12
|
+
export { default as $typography } from './typography.module.css'
|
|
12
13
|
export type * from './typography.types'
|
|
13
14
|
export * from './typography.keys'
|
|
14
15
|
|
|
15
|
-
export const TypographyPropsKeys: ReadonlyArray<keyof TypographyProps> = [
|
|
16
|
-
'typography'
|
|
17
|
-
]
|
|
16
|
+
export const TypographyPropsKeys: ReadonlyArray<keyof TypographyProps> = ['typography']
|
|
18
17
|
|
|
19
18
|
export const typography: ThemeContract = {
|
|
20
19
|
key: TypographyContractKey,
|
|
@@ -5,19 +5,21 @@ import type { ThemePresetName } from '../../types'
|
|
|
5
5
|
import type { ContractContext } from '../generator'
|
|
6
6
|
import createTypographyGenerator from './typography.generator'
|
|
7
7
|
|
|
8
|
-
const ctx = (config = {}): ContractContext => ({
|
|
8
|
+
const ctx = (config = {}, settings = {}): ContractContext => ({
|
|
9
9
|
presetName: 'test' as ThemePresetName,
|
|
10
10
|
config,
|
|
11
|
-
settings
|
|
11
|
+
settings,
|
|
12
12
|
hash: hashClassName
|
|
13
13
|
})
|
|
14
14
|
|
|
15
15
|
describe('createTypographyGenerator', () => {
|
|
16
|
-
it('emits
|
|
16
|
+
it('emits vars from the contract settings', () => {
|
|
17
17
|
const vars = createTypographyGenerator(
|
|
18
|
-
ctx({ typography: {
|
|
18
|
+
ctx({}, { typography: { fontSize: 20, fontSizeHeading: 22, headingRatio: 1.2 } })
|
|
19
19
|
).vars()
|
|
20
|
-
expect(vars
|
|
20
|
+
expect(vars).toEqual({
|
|
21
|
+
typo: { fs: '20px', 'h-ratio': 1.2, 'h-fs': '22px' }
|
|
22
|
+
})
|
|
21
23
|
})
|
|
22
24
|
|
|
23
25
|
it('emits nothing without config', () => {
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
// CONTRACT TEMPLATE - a skeleton for new theme contracts, consumed by
|
|
3
|
-
// scripts/gen-contract.ts in the templates package:
|
|
4
|
-
//
|
|
5
|
-
// pnpm contract:gen
|
|
6
|
-
//
|
|
7
|
-
// The generator copies this folder into <package>/src/contracts/<name>/
|
|
8
|
-
// (the theme package ships the contracts folder), substituting typography /
|
|
9
|
-
// Typography / typography / t in file bodies and names. After generation:
|
|
10
|
-
//
|
|
11
|
-
// 1. add the contract to src/contracts/index.ts (registry)
|
|
12
|
-
// 2. add <kebab>Generator to src/generator.ts (contractGenerators)
|
|
13
|
-
// 3. fill in the prop values / appearance config below
|
|
14
|
-
//
|
|
15
|
-
// The package itself stays unaware of the contract - types land in the
|
|
16
|
-
// registries via interface merging only.
|
|
17
|
-
// ---------------------------------------------------------------------------
|
|
18
|
-
import type { LiteralUnion, MaybeUnits, Numberish } from '@ui0/types'
|
|
1
|
+
import type { LiteralUnion, MaybeUnits } from '@ui0/types'
|
|
19
2
|
|
|
20
|
-
// 1. the values the prop accepts - the logical utility class names from
|
|
21
|
-
// typography.module.css (hashed onto the theme's setter classes)
|
|
22
3
|
export type TypographyProp = LiteralUnion<
|
|
23
4
|
| 'fw100'
|
|
24
5
|
| 'fw200'
|
|
@@ -54,15 +35,10 @@ export type TypographyProp = LiteralUnion<
|
|
|
54
35
|
| 'tw-stable'
|
|
55
36
|
>
|
|
56
37
|
|
|
57
|
-
// 2. the props this contract supplies to components
|
|
58
38
|
export interface TypographyProps {
|
|
59
39
|
typography?: TypographyProp
|
|
60
40
|
}
|
|
61
|
-
|
|
62
|
-
// 3. the contract's settings inside a theme preset (appearance config) -
|
|
63
|
-
// what the generator turns into css vars
|
|
64
41
|
export interface TypographyThemeAppearanceConfig {
|
|
65
|
-
/** e.g. a base value the generator emits as a css var */
|
|
66
42
|
fontSize?: MaybeUnits
|
|
67
43
|
|
|
68
44
|
// base of h6?
|
|
@@ -70,7 +46,6 @@ export interface TypographyThemeAppearanceConfig {
|
|
|
70
46
|
headingRatio?: number
|
|
71
47
|
}
|
|
72
48
|
export interface TypographyContractSettings {
|
|
73
|
-
/** e.g. a base value the generator emits as a css var */
|
|
74
49
|
fontSize?: MaybeUnits
|
|
75
50
|
|
|
76
51
|
// base of h6?
|
|
@@ -78,7 +53,6 @@ export interface TypographyContractSettings {
|
|
|
78
53
|
headingRatio?: number
|
|
79
54
|
}
|
|
80
55
|
|
|
81
|
-
// 4. registration: announces this contract to the package registries.
|
|
82
56
|
declare module '@ui0/types/theme' {
|
|
83
57
|
interface Ui0ThemePresetAppearanceConfig {
|
|
84
58
|
typography?: TypographyThemeAppearanceConfig
|
|
@@ -51,6 +51,7 @@ body {
|
|
|
51
51
|
--0-c-black-v: 0 0 0;
|
|
52
52
|
--0-c-cur-v: var(--0-c-foreground-v);
|
|
53
53
|
--0-c-cur: rgb(var(--0-c-cur-v, var(--0-c-foreground-v)) / var(--0-c-o, 1));
|
|
54
|
+
--0-c-theme-contrast-v: 0 0 0;
|
|
54
55
|
--0-f-cur-v: var(--0-c-background-v);
|
|
55
56
|
--0-f-cur: rgb(var(--0-f-cur-v, var(--0-c-background-v)) / var(--0-f-o, 1));
|
|
56
57
|
}
|
|
@@ -103,6 +104,16 @@ body {
|
|
|
103
104
|
--0-typo-h-ratio: 1.2;
|
|
104
105
|
--0-typo-h-fs: 22px;
|
|
105
106
|
}
|
|
107
|
+
.theme-default {
|
|
108
|
+
/* duration */
|
|
109
|
+
--0-d-superfast: 40ms;
|
|
110
|
+
--0-d-faster: 75ms;
|
|
111
|
+
--0-d-fast: 90ms;
|
|
112
|
+
--0-d-gently: 144ms;
|
|
113
|
+
--0-d-basic: 200ms;
|
|
114
|
+
--0-d-slow: 400ms;
|
|
115
|
+
--0-d-superslow: 1000ms;
|
|
116
|
+
}
|
|
106
117
|
.theme-default {
|
|
107
118
|
/* style */
|
|
108
119
|
--0-style-version: 1.0.0;
|
|
@@ -115,58 +126,11 @@ body {
|
|
|
115
126
|
/* color */
|
|
116
127
|
--0-c-foreground-v: 255 255 255;
|
|
117
128
|
--0-c-background-v: 0 0 0;
|
|
118
|
-
|
|
119
|
-
.theme-default.theme_dark {
|
|
120
|
-
/* dark additions */
|
|
121
|
-
--0-elv-x1: 1px;
|
|
122
|
-
--0-elv-y1: calc(var(--0-elv-x1) * 3);
|
|
123
|
-
--0-elv-x2: calc(var(--0-elv-x1) * 1.5);
|
|
124
|
-
--0-elv-y2: calc(var(--0-elv-x1) * 1.5);
|
|
125
|
-
--0-r-base: 4px;
|
|
126
|
-
--0-r-tl: 0px;
|
|
127
|
-
--0-r-tr: 0px;
|
|
128
|
-
--0-r-bl: 0px;
|
|
129
|
-
--0-r-basic: calc(var(--0-s-m, 42px) * var(--0-s-density, 1));
|
|
130
|
-
--0-r-br: 0px;
|
|
131
|
-
--0-display-xxs: 320px;
|
|
132
|
-
--0-display-xs: 480px;
|
|
133
|
-
--0-display-sm: 640px;
|
|
134
|
-
--0-display-md: 832px;
|
|
135
|
-
--0-display-lg: 1024px;
|
|
136
|
-
--0-display-hd: 1280px;
|
|
137
|
-
--0-display-xl: 1440px;
|
|
138
|
-
--0-display-xxl: 1680px;
|
|
139
|
-
--0-display-fhd: 1920px;
|
|
140
|
-
--0-display-qhd: 2560px;
|
|
141
|
-
--0-display-uhd: 3840px;
|
|
129
|
+
--0-c-theme-contrast-v: 255 255 255;
|
|
142
130
|
}
|
|
143
131
|
.theme-default.theme_light {
|
|
144
132
|
color-scheme: light;
|
|
145
133
|
}
|
|
146
|
-
.theme-default.theme_light {
|
|
147
|
-
/* light additions */
|
|
148
|
-
--0-elv-x1: 1px;
|
|
149
|
-
--0-elv-y1: calc(var(--0-elv-x1) * 3);
|
|
150
|
-
--0-elv-x2: calc(var(--0-elv-x1) * 1.5);
|
|
151
|
-
--0-elv-y2: calc(var(--0-elv-x1) * 1.5);
|
|
152
|
-
--0-r-base: 4px;
|
|
153
|
-
--0-r-tl: 0px;
|
|
154
|
-
--0-r-tr: 0px;
|
|
155
|
-
--0-r-bl: 0px;
|
|
156
|
-
--0-r-basic: calc(var(--0-s-m, 42px) * var(--0-s-density, 1));
|
|
157
|
-
--0-r-br: 0px;
|
|
158
|
-
--0-display-xxs: 320px;
|
|
159
|
-
--0-display-xs: 480px;
|
|
160
|
-
--0-display-sm: 640px;
|
|
161
|
-
--0-display-md: 832px;
|
|
162
|
-
--0-display-lg: 1024px;
|
|
163
|
-
--0-display-hd: 1280px;
|
|
164
|
-
--0-display-xl: 1440px;
|
|
165
|
-
--0-display-xxl: 1680px;
|
|
166
|
-
--0-display-fhd: 1920px;
|
|
167
|
-
--0-display-qhd: 2560px;
|
|
168
|
-
--0-display-uhd: 3840px;
|
|
169
|
-
}
|
|
170
134
|
.si_bce5 {
|
|
171
135
|
--0-s: var(--0-s-xxxs);
|
|
172
136
|
}
|