2022-10-14 17:56:32 +08:00
|
|
|
$keep-container-border-radius = 0.4rem
|
2020-09-05 22:41:10 +08:00
|
|
|
|
2021-01-21 18:23:22 +08:00
|
|
|
hover-style(isTransform, scaleX, scaleY) {
|
2022-09-30 10:51:42 +08:00
|
|
|
box-shadow 2px 2px 5px var(--shadow-color)
|
2021-01-26 10:44:51 +08:00
|
|
|
|
|
|
|
if (isTransform) {
|
2022-09-30 10:51:42 +08:00
|
|
|
transition-t("transform", "0", "0.2", "linear")
|
2021-01-26 10:44:51 +08:00
|
|
|
}
|
2020-08-06 10:44:29 +08:00
|
|
|
|
2020-11-13 14:43:22 +08:00
|
|
|
&:hover {
|
2021-01-21 18:23:22 +08:00
|
|
|
if (hexo-config('style.hover.scale') && isTransform) {
|
2022-09-30 10:51:42 +08:00
|
|
|
transform scaleX(scaleX) scaleY(scaleX)
|
2020-04-24 22:49:10 +08:00
|
|
|
}
|
2020-06-06 11:32:00 +08:00
|
|
|
|
2020-11-13 14:43:22 +08:00
|
|
|
if (hexo-config('style.hover.shadow')) {
|
2022-09-30 10:51:42 +08:00
|
|
|
box-shadow 2px 2px 8px var(--shadow-hover-color)
|
2020-11-13 14:43:22 +08:00
|
|
|
}
|
2020-04-24 22:49:10 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-09-05 22:41:10 +08:00
|
|
|
|
2021-01-21 18:23:22 +08:00
|
|
|
keep-container(isTransform, scaleX, scaleY, padding, marginBottomValue) {
|
2022-09-30 10:51:42 +08:00
|
|
|
box-sizing border-box
|
|
|
|
padding padding
|
2022-10-14 17:56:32 +08:00
|
|
|
background var(--content-background-color)
|
2022-09-30 10:51:42 +08:00
|
|
|
border-radius $keep-container-border-radius
|
2020-11-19 11:58:54 +08:00
|
|
|
|
2020-11-27 11:19:34 +08:00
|
|
|
if (marginBottomValue != 0) {
|
2022-09-30 10:51:42 +08:00
|
|
|
margin-bottom marginBottomValue
|
2020-11-19 11:58:54 +08:00
|
|
|
|
2020-11-20 12:02:22 +08:00
|
|
|
+keep-tablet() {
|
2022-09-30 10:51:42 +08:00
|
|
|
margin-bottom marginBottomValue * 0.8
|
2020-11-19 11:58:54 +08:00
|
|
|
}
|
|
|
|
|
2020-11-20 12:02:22 +08:00
|
|
|
+keep-mobile() {
|
2022-09-30 10:51:42 +08:00
|
|
|
margin-bottom marginBottomValue * 0.6
|
2020-11-19 11:58:54 +08:00
|
|
|
}
|
|
|
|
}
|
2020-11-13 14:43:22 +08:00
|
|
|
|
2020-11-27 11:19:34 +08:00
|
|
|
|
2022-09-30 10:51:42 +08:00
|
|
|
hover-style(isTransform, scaleX, scaleY)
|
2020-09-05 22:41:10 +08:00
|
|
|
|
2020-11-20 12:02:22 +08:00
|
|
|
+keep-tablet() {
|
2022-09-30 10:51:42 +08:00
|
|
|
padding padding * 0.8
|
|
|
|
border-radius $keep-container-border-radius * 0.8
|
2020-09-05 22:41:10 +08:00
|
|
|
}
|
|
|
|
|
2021-01-21 18:23:22 +08:00
|
|
|
|
2020-11-20 12:02:22 +08:00
|
|
|
+keep-mobile() {
|
2022-09-30 10:51:42 +08:00
|
|
|
padding padding * 0.6
|
|
|
|
border-radius $keep-container-border-radius * 0.6
|
2020-09-05 22:41:10 +08:00
|
|
|
}
|
2020-04-24 22:49:10 +08:00
|
|
|
}
|
2022-10-02 00:17:32 +08:00
|
|
|
|
|
|
|
disable-user-select() {
|
|
|
|
-moz-user-select none
|
|
|
|
-ms-user-select none
|
|
|
|
-webkit-user-select none
|
|
|
|
user-select none
|
|
|
|
}
|