mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 09:21:24 +08:00
11 lines
303 B
C#
11 lines
303 B
C#
namespace AntDesign
|
|
{
|
|
public static class StyleHelper
|
|
{
|
|
//fix the user set 100% or xxxVH etc..
|
|
public static string ToCssPixel(string value) => int.TryParse(value, out var _) ? $"{value}px" : value;
|
|
|
|
public static string ToCssPixel(int value) => $"{value}px";
|
|
}
|
|
}
|