neverland 1a7889590f
perf: remove CSS variables polyfill (#4487)
* perf: remove CSS variables polyfill

* style: fix missing calc value

* perf: reduce some useless css vars
2021-09-23 17:31:28 +08:00

95 lines
1.8 KiB
Plaintext

@import '../common/style/var.less';
.van-grid-item {
position: relative;
float: left;
box-sizing: border-box;
&--square {
height: 0;
}
&__content {
display: flex;
flex-direction: column;
box-sizing: border-box;
height: 100%;
padding: var(--grid-item-content-padding, @grid-item-content-padding);
background-color: var(
--grid-item-content-background-color,
@grid-item-content-background-color
);
&::after {
z-index: 1;
border-width: 0 @border-width-base @border-width-base 0;
}
&--surround {
&::after {
border-width: @border-width-base;
}
}
&--center {
align-items: center;
justify-content: center;
}
&--square {
position: absolute;
top: 0;
right: 0;
left: 0;
}
&--horizontal {
flex-direction: row;
.van-grid-item__text {
margin: 0 0 0 @padding-xs;
}
}
&--reverse {
flex-direction: column-reverse;
.van-grid-item__text {
margin: 0 0 @padding-xs;
}
}
&--horizontal&--reverse {
flex-direction: row-reverse;
.van-grid-item__text {
margin: 0 @padding-xs 0 0;
}
}
&--clickable:active {
background-color: var(
--grid-item-content-active-color,
@grid-item-content-active-color
);
}
}
&__icon {
display: flex;
align-items: center;
font-size: var(--grid-item-icon-size, @grid-item-icon-size);
height: var(--grid-item-icon-size, @grid-item-icon-size);
}
&__text {
word-wrap: break-word;
color: var(--grid-item-text-color, @grid-item-text-color);
font-size: var(--grid-item-text-font-size, @grid-item-text-font-size);
}
&__icon + &__text {
margin-top: 8px;
}
}