-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
63 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { BASIS, DASH, FLEX, FULL, PERCENT100 } from './constants/css-property-keyword'; | ||
import { BASIS, DASH, FLEX, SIZING_VALUES } from './constants/css-property-keyword'; | ||
import { Style } from '@master/style'; | ||
|
||
export class FlexBasisStyle extends Style { | ||
static override properties = [FLEX + DASH + BASIS]; | ||
static override values = { [FULL]: PERCENT100 }; | ||
static override values = SIZING_VALUES; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
import { FIT, FIT_CONTENT, FULL, HEIGHT, H_PREFIX, MAX, MAX_CONTENT, MIN, MIN_CONTENT, PERCENT100 } from './constants/css-property-keyword'; | ||
import { HEIGHT, SIZING_VALUES } from './constants/css-property-keyword'; | ||
import { Style } from '@master/style'; | ||
|
||
export class HeightStyle extends Style { | ||
static override prefixes = /^h:/; | ||
static override properties = [HEIGHT]; | ||
static override values = { | ||
[FULL]: PERCENT100, | ||
[FIT]: FIT_CONTENT, | ||
[MAX]: MAX_CONTENT, | ||
[MIN]: MIN_CONTENT | ||
} | ||
static override values = SIZING_VALUES; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import { FIT, FIT_CONTENT, FULL, MAX, MAX_CONTENT, MAX_HEIGHT, MIN, MIN_CONTENT, PERCENT100 } from './constants/css-property-keyword'; | ||
import { FIT_CONTENT, MAX_CONTENT, MAX_HEIGHT, MIN_CONTENT, PERCENT100 } from './constants/css-property-keyword'; | ||
import { Style } from '@master/style'; | ||
|
||
export class MaxHeightStyle extends Style { | ||
static override prefixes = /^max-h(eight)?:/; | ||
static override properties = [MAX_HEIGHT]; | ||
static override supportFullName = false; | ||
static override values = { | ||
[FULL]: PERCENT100, | ||
[FIT]: FIT_CONTENT, | ||
[MAX]: MAX_CONTENT, | ||
[MIN]: MIN_CONTENT | ||
full: PERCENT100, | ||
fit: FIT_CONTENT, | ||
max: MAX_CONTENT, | ||
min: MIN_CONTENT | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
import { FIT, FIT_CONTENT, FULL, MAX, MAX_CONTENT, MAX_WIDTH, MIN, MIN_CONTENT, PERCENT100, W_PREFIX } from './constants/css-property-keyword'; | ||
import { MAX_WIDTH, SIZING_VALUES } from './constants/css-property-keyword'; | ||
import { Style } from '@master/style'; | ||
|
||
export class MaxWidthStyle extends Style { | ||
static override prefixes = /^max-w(idth)?:/; | ||
static override prefixes = /^max-w(idth)?:/; | ||
static override properties = [MAX_WIDTH]; | ||
static override supportFullName = false; | ||
static override values = { | ||
[FULL]: PERCENT100, | ||
[FIT]: FIT_CONTENT, | ||
[MAX]: MAX_CONTENT, | ||
[MIN]: MIN_CONTENT | ||
} | ||
static override values = SIZING_VALUES; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import { DASH, FIT, FIT_CONTENT, FULL, H_PREFIX, MAX, MAX_CONTENT, MIN, MIN_CONTENT, MIN_HEIGHT, PERCENT100 } from './constants/css-property-keyword'; | ||
import { DASH, FIT_CONTENT, H_PREFIX, MAX_CONTENT, MIN, MIN_CONTENT, MIN_HEIGHT, PERCENT100 } from './constants/css-property-keyword'; | ||
import { Style } from '@master/style'; | ||
|
||
const MIN_HEIGHT_PREFIX = MIN + DASH + H_PREFIX; | ||
|
||
export class MinHeightStyle extends Style { | ||
static override prefixes = /^min-h(eight)?:/; | ||
static override prefixes = /^min-h(eight)?:/; | ||
static override properties = [MIN_HEIGHT]; | ||
static override supportFullName = false; | ||
static override values = { | ||
[FULL]: PERCENT100, | ||
[FIT]: FIT_CONTENT, | ||
[MAX]: MAX_CONTENT, | ||
[MIN]: MIN_CONTENT | ||
full: PERCENT100, | ||
fit: FIT_CONTENT, | ||
max: MAX_CONTENT, | ||
min: MIN_CONTENT | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
import { DASH, FIT, FIT_CONTENT, FULL, MAX, MAX_CONTENT, MIN, MIN_CONTENT, MIN_WIDTH, PERCENT100, W_PREFIX } from './constants/css-property-keyword'; | ||
import { DASH, MIN, MIN_WIDTH, SIZING_VALUES, W_PREFIX } from './constants/css-property-keyword'; | ||
import { Style } from '@master/style'; | ||
|
||
const MIN_W_PREFIX = MIN + DASH + W_PREFIX; | ||
|
||
export class MinWidthStyle extends Style { | ||
static override prefixes = /^min-w(idth)?:/; | ||
static override prefixes = /^min-w(idth)?:/; | ||
static override properties = [MIN_WIDTH]; | ||
static override supportFullName = false; | ||
static override values = { | ||
[FULL]: PERCENT100, | ||
[FIT]: FIT_CONTENT, | ||
[MAX]: MAX_CONTENT, | ||
[MIN]: MIN_CONTENT | ||
} | ||
static override values = SIZING_VALUES; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
import { ABS, ABSOLUTE, FIXED, POSITION, REL, RELATIVE, STATIC, STICKY } from './constants/css-property-keyword'; | ||
import { ABSOLUTE, POSITION, RELATIVE } from './constants/css-property-keyword'; | ||
import { Style } from '@master/style'; | ||
|
||
export class PositionStyle extends Style { | ||
static override properties = [POSITION]; | ||
static override values = { | ||
[ABS]: ABSOLUTE, | ||
[REL]: RELATIVE | ||
'abs': ABSOLUTE, | ||
'rel': RELATIVE | ||
}; | ||
} | ||
|
||
PositionStyle.semantics = {}; | ||
for (const value of [ | ||
STATIC, | ||
FIXED, | ||
ABS, | ||
REL, | ||
STICKY | ||
]) { | ||
PositionStyle.semantics[value] = value; | ||
} | ||
static semantics = { | ||
static: 'static', | ||
fixed: 'fixed', | ||
abs: 'absolute', | ||
rel: 'relative', | ||
sticky: 'sticky' | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
import { FIT, FIT_CONTENT, FULL, MAX, MAX_CONTENT, MIN, MIN_CONTENT, PERCENT100, WIDTH } from './constants/css-property-keyword'; | ||
import { SIZING_VALUES, WIDTH } from './constants/css-property-keyword'; | ||
import { Style } from '@master/style'; | ||
|
||
export class WidthStyle extends Style { | ||
static override prefixes = /^w:/; | ||
static override prefixes = /^w:/; | ||
static override properties = [WIDTH]; | ||
static override values = { | ||
[FULL]: PERCENT100, | ||
[FIT]: FIT_CONTENT, | ||
[MAX]: MAX_CONTENT, | ||
[MIN]: MIN_CONTENT | ||
} | ||
static override values = SIZING_VALUES; | ||
} |