Skip to content

Commit

Permalink
AUI: Add a few style properties
Browse files Browse the repository at this point in the history
  • Loading branch information
bheston committed Oct 17, 2024
1 parent a50a024 commit b1ea243
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
16 changes: 16 additions & 0 deletions packages/adaptive-ui/src/core/modules/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,24 @@ export const stylePropertyToCssProperty = (usage: StyleProperty): string => {
return "gap";
case StyleProperty.height:
return "height";
case StyleProperty.minHeight:
return "min-height";
case StyleProperty.maxHeight:
return "max-height";
case StyleProperty.width:
return "width";
case StyleProperty.minWidth:
return "min-width";
case StyleProperty.maxWidth:
return "max-width";
case StyleProperty.layoutInner:
return "display";
case StyleProperty.layoutDirection:
return "flex-direction";
case StyleProperty.layoutMainAxisAlignItems:
return "justify-content";
case StyleProperty.layoutCrossAxisAlignItems:
return "align-items";
case StyleProperty.opacity:
return "opacity";
case StyleProperty.cursor:
Expand All @@ -93,6 +107,8 @@ export const stylePropertyToCssProperty = (usage: StyleProperty): string => {
return "outline-offset";
case StyleProperty.outlineStyle:
return "outline-style";
case StyleProperty.outlineThickness:
return "outline-width";
case StyleProperty.outlineWidth:
return "outline-width";
case StyleProperty.shadow:
Expand Down
10 changes: 10 additions & 0 deletions packages/adaptive-ui/src/core/modules/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,23 @@ export const StyleProperty = {
paddingLeft: "paddingLeft",
gap: "gap",
height: "height",
minHeight: "minHeight",
maxHeight: "maxHeight",
width: "width",
minWidth: "minWidth",
maxWidth: "maxWidth",
// layoutOuter: "layoutOuter", // TODO Add support for inline or block definition
layoutInner: "layoutInner",
layoutDirection: "layoutDirection",
layoutMainAxisAlignItems: "layoutMainAxisAlignItems",
layoutCrossAxisAlignItems: "layoutCrossAxisAlignItems",
opacity: "opacity",
cursor: "cursor",
outlineColor: "outlineColor",
outlineOffset: "outlineOffset",
outlineStyle: "outlineStyle",
outlineThickness: "outlineThickness",
/** @deprecated Use outlineThickness */
outlineWidth: "outlineWidth",
shadow: "shadow",
} as const;
Expand Down
2 changes: 1 addition & 1 deletion packages/adaptive-ui/src/reference/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ export const focusIndicatorStyles: Styles = Styles.fromProperties(
outlineColor: focusStroke,
outlineOffset: "1px",
outlineStyle: "solid",
outlineWidth: focusStrokeThickness,
outlineThickness: focusStrokeThickness,
},
"styles.focus-indicator",
);
Expand Down

0 comments on commit b1ea243

Please sign in to comment.