本文整理匯總了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()),
};
}