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

72 lines
1.5 KiB
Plaintext

@import '../common/style/var.less';
.van-nav-bar {
position: relative;
text-align: center;
user-select: none;
height: var(--nav-bar-height, @nav-bar-height);
line-height: var(--nav-bar-height, @nav-bar-height);
background-color: var(--nav-bar-background-color, @nav-bar-background-color);
&__content {
position: relative;
height: 100%;
}
&__text {
display: inline-block;
vertical-align: middle;
margin: 0 calc(-1 * var(--padding-md, @padding-md));
padding: 0 var(--padding-md, @padding-md);
color: var(--nav-bar-text-color, @nav-bar-text-color);
&--hover {
background-color: @active-color;
}
}
&__arrow {
vertical-align: middle;
font-size: var(--nav-bar-arrow-size, @nav-bar-arrow-size) !important;
color: var(--nav-bar-icon-color, @nav-bar-icon-color) !important;
+ .van-nav-bar__text {
margin-left: -20px;
padding-left: 25px;
}
}
&--fixed {
position: fixed;
top: 0;
left: 0;
width: 100%;
}
&__title {
max-width: 60%;
margin: 0 auto;
color: var(--nav-bar-title-text-color, @nav-bar-title-text-color);
font-weight: var(--font-weight-bold, @font-weight-bold);
font-size: var(--nav-bar-title-font-size, @nav-bar-title-font-size);
}
&__left,
&__right {
position: absolute;
top: 0;
bottom: 0;
display: flex;
align-items: center;
font-size: var(--font-size-md, @font-size-md);
}
&__left {
left: var(--padding-md, @padding-md);
}
&__right {
right: var(--padding-md, @padding-md);
}
}