blog_theme/assets/less/misc/utilities.less
2019-05-03 23:11:39 +08:00

158 lines
2.2 KiB
Plaintext

.u-plain-list {
list-style-type: none;
margin: 0;
padding: 0;
}
.u-placeholder {
background-color: @light-gray-color;
position: relative;
z-index: 10;
&.same-height {
height: 0;
}
&.rectangle {
padding-bottom: 56.25%;
}
}
.u-object-fit {
height: 100%;
left: 0;
object-fit: cover;
position: absolute;
top: 0;
width: 100%;
}
.u-permalink {
bottom: 0;
left: 0;
outline: none;
position: absolute;
right: 0;
top: 0;
z-index: 10;
}
.u-hover-item {
transition: opacity .3s @animation-base;
}
.u-hover-wrapper:hover .u-hover-item {
opacity: .5;
&:hover {
opacity: 1;
}
}
.u-text-format {
h1, h2, h3, h4, h5, h6 {
font-weight: 800;
margin-top: 40px;
}
h1 {
font-size: 26px;
}
h2 {
font-size: 23px;
}
h3 {
font-size: 20px;
}
h4 {
font-size: 17px;
font-weight: 700;
}
h5 {
font-size: 15px;
font-weight: 700;
}
h6 {
font-size: 13px;
font-weight: 700;
text-transform: uppercase;
}
strong {
color: @dark-gray-color;
}
a {
color: var(--primary-color);
position: relative;
&:after {
background-color: var(--primary-color);
bottom: -1px;
content: "";
height: 1px;
left: 0;
position: absolute;
width: 100%;
}
}
ul, ol {
list-style-type: none;
padding-left: 35px;
position: relative;
li {
align-items: center;
display: flex;
line-height: 1.3;
margin: 15px 0;
}
li:before {
background-color: var(--primary-color);
left: 0;
position: absolute;
}
}
ul li:before {
border-radius: 50%;
content: "";
height: 6px;
left: 13px;
width: 6px;
}
ol {
counter-reset: numbered-list;
li:before {
border-radius: 50%;
color: @white-color;
content: counter(numbered-list);
counter-increment: numbered-list;
font-size: 13px;
font-weight: 800;
height: 24px;
line-height: 24px;
text-align: center;
width: 24px;
}
}
& > *:first-child,
& > *:first-child > *:first-child {
margin-top: 0 !important;
}
& > *:last-child,
& > *:last-child > *:last-child {
margin-bottom: 0 !important;
}
}