用户:Salt lovely/Vector.scss:修订间差异

添加1,274字节 、​ 2021年3月17日 (星期三)
.
(.)
(.)
<pre>$topbar-height: 1.5rem; // 顶栏高度
<pre>// 无边框
$topbar-padding: 0.5rem; // 顶栏高度
$top-gap: 0.5rem; // 主体与顶栏的间隙
$top-height: $topbar-height + $topbar-padding * 2; // 顶部高度
$content-bookborder: 46px; // 四周书页图片宽度
$content-top: calc(
#{$content-bookborder} + #{$top-height + $top-gap}
); // 主体部分高度(顶部+书页背景顶部边框)
/* 源代码: 用户:Salt_lovely/Vector.scss */
<pre>// 无边框
@mixin noboder {
border: none;
margin: 0;
padding: 0;
position: relative;
font-size: 1rem;
line-height: 1.3rem;
cursor: pointer;
&::after {
position: absolute;
bottom: 0;
right: 0;
opacity: 0;
font-size: 0.75rem;
line-height: 1.3rem;
transition: 0.3s ease;
}
&:hover::after {
opacity: 0.9;
}
}
.body {
}
}
&.salt-close .body {
max-height:> 0px;h1,
> h2,
> h3,
> h4,
> h5,
> h6 {
&::after {
content: "点击展开";
}
}
.body {
max-height: 0px;
}
}
&.salt-open .body {
max-height:> var(--salt-open-heighth1, 100vh);
> h2,
> h3,
> h4,
> h5,
> h6 {
&::after {
content: "点击收起";
}
}
.body {
max-height: var(--salt-open-height, 100vh);
}
}
}
}
// 主体
$content-bookborder: 46px; // 四周书页图片宽度
 
$bookborder-lefttop: url(https://s2.ax1x.com/2019/11/28/QFB2X4.png);
 
#content {
top: calc(#{$content-bookborder} + 2rem)top;
padding: 1px $content-bookborder * 1.5;
margin-right: 0.5rem;
$head-right-offet: 12px; // 右侧导航栏偏移量
#mw-head {
top: calc(#{$content-bookborder} + 2rem)top;
padding: 0 $content-bookborder * 1.5 - $head-right-offet 0
$content-bookborder * 1.5;
0deg,
var(--linecolor) 0%,
var(--bgcolor) 3020%
);
&:hover {
0deg,
var(--linecolor) 0%,
var(--bgcolor) 2012%
);
}
margin-right: 0;
}
// 最顶部的信息栏
#p-personal {
width: 100%;
top: 0;
right: 0;
paddingheight: 0.5rem 1rem$topbar-height;
padding: $topbar-padding $topbar-padding * 2;
background: url(https://www.mcbbs.net/template/mcbbs/image/top_bg.png);
background-size: contain;