Skip to content

Commit 1d7ae23

Browse files
authored
优化逻辑
1 parent 07699cc commit 1d7ae23

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

_sass/minimal-mistakes-plus/vendor/breakpoint/_breakpoint.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ $breakpoint: () !default;
7373
// Print Out Query String
7474
@if not breakpoint-get('no queries') {
7575
@if str-index($query-string, "width") {
76-
&:is(.horizontal, .horizontal *) {
76+
&:not(html.vertical, html.vertical *) {
7777
@media #{$query-string} {
7878
@content;
7979
}
@@ -86,7 +86,7 @@ $breakpoint: () !default;
8686
}
8787
}
8888
} @else if (str-index($query-string, "height")) {
89-
&:is(.horizontal, .horizontal *) {
89+
&:not(html.vertical, html.vertical *) {
9090
@media #{$query-string} {
9191
@content;
9292
}

assets/js/init.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ window.addEventListener("DOMContentLoaded", function () {
7272
var isAprilFoolsDay = now.getMonth() === 3 && now.getDate() === 1;
7373
settings.onChange("miscellaneous_april_fools", function (strategy) {
7474
var root = document.documentElement;
75-
root.classList.remove("vertical", "horizontal");
76-
root.classList.add((strategy === "disable" || strategy !== "enable" && !isAprilFoolsDay) ? "horizontal" : "vertical");
75+
root.classList.remove("vertical");
76+
if (strategy !== "disable" && (strategy === "enable" || isAprilFoolsDay)) {
77+
root.classList.add("vertical");
78+
}
7779
});
7880
});

0 commit comments

Comments
 (0)