* Fix header height and positioning for wc nav

* Remove body margin via CSS
This commit is contained in:
Joshua T Flowers 2020-09-29 15:57:50 +03:00 committed by GitHub
parent 27a6b4d967
commit 6e8b4bad5f
7 changed files with 13 additions and 7 deletions

View File

@ -262,3 +262,7 @@
.woocommerce-layout__notice-list-hide { .woocommerce-layout__notice-list-hide {
display: none; display: none;
} }
.has-woocommerce-navigation .woocommerce-layout__activity-panel {
top: 0;
}

View File

@ -1,7 +1,6 @@
.woocommerce-layout__header { .woocommerce-layout__header {
background: $studio-white; background: $studio-white;
box-sizing: border-box; box-sizing: border-box;
border-bottom: 1px solid $studio-white;
padding: 0; padding: 0;
min-height: $header-height; min-height: $header-height;
position: fixed; position: fixed;
@ -42,6 +41,10 @@
} }
} }
.has-woocommerce-navigation .woocommerce-layout__header {
top: 0;
}
.woocommerce-page { .woocommerce-page {
#contextual-help-link-wrap, #contextual-help-link-wrap,
#screen-options-link-wrap { #screen-options-link-wrap {

View File

@ -50,6 +50,7 @@
color: $studio-gray-60; color: $studio-gray-60;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell,
'Helvetica Neue', sans-serif; 'Helvetica Neue', sans-serif;
margin-top: -32px;
#wpwrap { #wpwrap {
top: 0; top: 0;
@ -73,7 +74,7 @@
} }
#wpcontent { #wpcontent {
margin-left: 0; margin-left: 0 !important;
> #wpbody { > #wpbody {
display: block; display: block;

View File

@ -75,7 +75,6 @@ class ProfileWizard extends Component {
const { activePlugins, profileItems, updateProfileItems } = this.props; const { activePlugins, profileItems, updateProfileItems } = this.props;
document.body.classList.remove( 'woocommerce-admin-is-loading' ); document.body.classList.remove( 'woocommerce-admin-is-loading' );
document.documentElement.classList.remove( 'wp-toolbar' );
document.body.classList.add( 'woocommerce-onboarding' ); document.body.classList.add( 'woocommerce-onboarding' );
document.body.classList.add( 'woocommerce-profile-wizard__body' ); document.body.classList.add( 'woocommerce-profile-wizard__body' );
document.body.classList.add( 'woocommerce-admin-full-screen' ); document.body.classList.add( 'woocommerce-admin-full-screen' );
@ -100,7 +99,6 @@ class ProfileWizard extends Component {
} }
componentWillUnmount() { componentWillUnmount() {
document.documentElement.classList.add( 'wp-toolbar' );
document.body.classList.remove( 'woocommerce-onboarding' ); document.body.classList.remove( 'woocommerce-onboarding' );
document.body.classList.remove( 'woocommerce-profile-wizard__body' ); document.body.classList.remove( 'woocommerce-profile-wizard__body' );
document.body.classList.remove( 'woocommerce-admin-full-screen' ); document.body.classList.remove( 'woocommerce-admin-full-screen' );

View File

@ -194,7 +194,7 @@ p.woocommerce-profile-wizard__themes-skip-this-step {
background: $studio-white; background: $studio-white;
flex-direction: row; flex-direction: row;
display: flex; display: flex;
height: 56px; height: $header-height;
border-bottom: 1px solid $studio-gray-5; border-bottom: 1px solid $studio-gray-5;
padding-left: $gap; padding-left: $gap;
padding-right: $gap; padding-right: $gap;

View File

@ -60,7 +60,7 @@
} }
.woocommerce-profile-wizard__header { .woocommerce-profile-wizard__header {
height: 56px; height: $header-height;
border-bottom: 1px solid $studio-gray-5; border-bottom: 1px solid $studio-gray-5;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -24,7 +24,7 @@ $gap-smaller: 8px;
$gap-smallest: 4px; $gap-smallest: 4px;
// Header // Header
$header-height: 56px; $header-height: 60px;
// Sidebar // Sidebar
$sidebar-width: 272px; $sidebar-width: 272px;