Optimize box-shadow of .site-brand-container

This commit is contained in:
Mimi 2020-08-19 13:26:38 +08:00
parent 60facf4b00
commit 402c34e9bb
5 changed files with 9 additions and 5 deletions

1
.github/labeler.yml vendored
View File

@ -5,3 +5,4 @@ Configurations: _config.yml
CSS: source/css/**/*
📖 Docs: docs/**/*
Layout: layout/**/*
🌍 i18n: languages/**/*

View File

@ -853,6 +853,7 @@ canvas_ribbon:
vendors:
# The CDN provider of NexT internal scripts.
# Available values: local | jsdelivr | unpkg
# Warning: If you are using the latest master branch of NexT, please set `internal: local`
internal: local
# The default CDN provider of third-party plugins.
# Available values: local | jsdelivr | unpkg | cdnjs

View File

@ -22,7 +22,7 @@
display: none;
}
&.site-nav-on {
.site-nav-on & {
display: block;
}
}

View File

@ -1,8 +1,10 @@
.site-brand-container {
background: $black-deep;
+tablet-mobile() {
box-shadow: 0 0 16px rgba(0, 0, 0, .5);
.site-nav-on & {
+tablet-mobile() {
box-shadow: 0 0 16px rgba(0, 0, 0, .5);
}
}
}

View File

@ -12,10 +12,10 @@ NexT.boot.registerEvents = function() {
event.currentTarget.classList.toggle('toggle-close');
const siteNav = document.querySelector('.site-nav');
if (!siteNav) return;
const animateAction = siteNav.classList.contains('site-nav-on');
const animateAction = document.body.classList.contains('site-nav-on');
const height = NexT.utils.getComputedStyle(siteNav);
siteNav.style.height = animateAction ? height : 0;
const toggle = () => siteNav.classList.toggle('site-nav-on');
const toggle = () => document.body.classList.toggle('site-nav-on');
const begin = () => {
siteNav.style.overflow = 'hidden';
};