本文整理汇总了TypeScript中csx.px函数的典型用法代码示例。如果您正苦于以下问题:TypeScript px函数的具体用法?TypeScript px怎么用?TypeScript px使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了px函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: px
bottomLeft: (bottom: BottomProperty<TLength> = px(0), left: LeftProperty<TLength> = px(0)) => {
return {
position: "absolute" as PositionProperty,
bottom: unit(bottom),
left: unit(left),
};
},
示例2: media
const oneColumn = styles => {
return media(
{
maxWidth: px(panelLayoutBreakPoints.oneColumn),
minWidth: px(panelLayoutBreakPoints.xs + 1),
},
styles,
);
};
示例3: fullSizeOfParent
export function fullSizeOfParent(): NestedCSSProperties {
return {
position: "absolute",
display: "block",
top: px(0),
left: px(0),
width: percent(100),
height: percent(100),
};
}
示例4: fakeBackgroundFixed
export function fakeBackgroundFixed() {
return {
content: quote(""),
display: "block",
position: "fixed",
top: px(0),
left: px(0),
width: viewWidth(100),
height: viewHeight(100),
};
}
示例5: srOnly
export function srOnly() {
return {
position: important("absolute"),
display: important("block"),
width: important(px(1).toString()),
height: important(px(1).toString()),
padding: important(px(0).toString()),
margin: important(px(-1).toString()),
overflow: important("hidden"),
clip: important(`rect(0, 0, 0, 0)`),
border: important(px(0).toString()),
};
}