Skip to content

Commit

Permalink
fix: remove semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
BenSeage committed Dec 30, 2021
1 parent 887a189 commit 87c91e6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion src/display.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export class DisplayStyle extends Style {

for (const value of [
BLOCK,
FLEX,
GRID,
TABLE,
CONTENTS,
Expand Down
10 changes: 1 addition & 9 deletions src/placement.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
import { AUTO, CENTER, MIDDLE } from './constants/css-property-keyword';
import { CENTER, MIDDLE } from './constants/css-property-keyword';
import { BOTTOM, LEFT, RIGHT, TOP } from './constants/direction';
import { Style } from '@master/style';

export class PlacementStyle extends Style {
static override matches = /^(top|left|right|bottom|center|middle):./;
static override semantics = {
top: { top: 0 },
left: { left: 0 },
right: { right: 0 },
bottom: { bottom: 0 },
center: { right: 0, left: 0, 'margin-left': AUTO, 'margin-right': AUTO },
middle: { top: 0, bottom: 0, 'margin-top': AUTO, 'margin-bottom': AUTO }
}
override get props(): { [key: string]: any } {
const propertyName = this.prefix.slice(0, -1);
switch (propertyName) {
Expand Down

0 comments on commit 87c91e6

Please sign in to comment.