Skip to content

Commit

Permalink
Merge branch 'add/grid-generator-styles' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
razwan committed Oct 6, 2020
2 parents 754438e + 3a86884 commit 00af8e1
Show file tree
Hide file tree
Showing 20 changed files with 49 additions and 27 deletions.
3 changes: 3 additions & 0 deletions dist/css/block-editor-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@
.content-is-highlighted:not(.block-is-highlighted) .editor-styles-wrapper .novablocks-card a:not(.wp-block-button__link) {
color: inherit;
text-decoration-color: inherit; }
.editor-styles-wrapper .novablocks-card__inner-container[class] {
padding-right: 0;
padding-left: 0; }
.editor-styles-wrapper [data-type="novablocks/media"] + .editor-styles-wrapper [data-type="novablocks/media"],
.editor-styles-wrapper [data-type="novablocks/cards-collection"] + .editor-styles-wrapper [data-type="novablocks/media"],
.editor-styles-wrapper [data-type="novablocks/posts-collection"] + .editor-styles-wrapper [data-type="novablocks/media"],
Expand Down
3 changes: 3 additions & 0 deletions dist/css/block-editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@
.content-is-highlighted:not(.block-is-highlighted) .editor-styles-wrapper .novablocks-card a:not(.wp-block-button__link) {
color: inherit;
text-decoration-color: inherit; }
.editor-styles-wrapper .novablocks-card__inner-container[class] {
padding-left: 0;
padding-right: 0; }
.editor-styles-wrapper [data-type="novablocks/media"] + .editor-styles-wrapper [data-type="novablocks/media"],
.editor-styles-wrapper [data-type="novablocks/cards-collection"] + .editor-styles-wrapper [data-type="novablocks/media"],
.editor-styles-wrapper [data-type="novablocks/posts-collection"] + .editor-styles-wrapper [data-type="novablocks/media"],
Expand Down
4 changes: 4 additions & 0 deletions dist/css/blocks/editor-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ ul.wp-block-categories__list[class] {
color: inherit;
text-decoration-color: inherit; }

.novablocks-card__inner-container[class] {
padding-right: 0;
padding-left: 0; }

[data-type="novablocks/media"] + [data-type="novablocks/media"],
[data-type="novablocks/cards-collection"] + [data-type="novablocks/media"],
[data-type="novablocks/posts-collection"] + [data-type="novablocks/media"],
Expand Down
4 changes: 4 additions & 0 deletions dist/css/blocks/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ ul.wp-block-categories__list[class] {
color: inherit;
text-decoration-color: inherit; }

.novablocks-card__inner-container[class] {
padding-left: 0;
padding-right: 0; }

[data-type="novablocks/media"] + [data-type="novablocks/media"],
[data-type="novablocks/cards-collection"] + [data-type="novablocks/media"],
[data-type="novablocks/posts-collection"] + [data-type="novablocks/media"],
Expand Down
7 changes: 7 additions & 0 deletions dist/css/blocks/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@
.novablocks-media__inner-container .wp-block-separator {
width: 100%; }

.novablocks-grid__column:first-child .novablocks-grid__area:first-child:last-child {
top: calc( var(--novablocks-grid-spacing) * var(--novablocks-grid-spacing-modifier, 1) + var(--site-header-height, 0)); }

.nova-food-menu {
--theme-content-width-normal: var(--theme-content-width-wide); }

Expand Down Expand Up @@ -516,3 +519,7 @@
.content-is-highlighted:not(.block-is-highlighted) .novablocks-card a:not(.wp-block-button__link) {
color: inherit;
text-decoration-color: inherit; }

.novablocks-card__inner-container[class] {
padding-right: 0;
padding-left: 0; }
7 changes: 7 additions & 0 deletions dist/css/blocks/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@
.novablocks-media__inner-container .wp-block-separator {
width: 100%; }

.novablocks-grid__column:first-child .novablocks-grid__area:first-child:last-child {
top: calc( var(--novablocks-grid-spacing) * var(--novablocks-grid-spacing-modifier, 1) + var(--site-header-height, 0)); }

.nova-food-menu {
--theme-content-width-normal: var(--theme-content-width-wide); }

Expand Down Expand Up @@ -516,3 +519,7 @@
.content-is-highlighted:not(.block-is-highlighted) .novablocks-card a:not(.wp-block-button__link) {
color: inherit;
text-decoration-color: inherit; }

.novablocks-card__inner-container[class] {
padding-left: 0;
padding-right: 0; }
3 changes: 1 addition & 2 deletions dist/css/theme/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ body.archive:not(.woocommerce-page), body.blog, body.search:not(.search-no-resul

.single .site-content,
.page .site-content {
padding-bottom: var(--theme-spacing-fluid-large);
overflow: hidden; }
padding-bottom: var(--theme-spacing-fluid-large); }

.page:not(.has-hero) .site-content {
padding-top: var(--theme-spacing-fluid-large); }
Expand Down
3 changes: 1 addition & 2 deletions dist/css/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ body.archive:not(.woocommerce-page), body.blog, body.search:not(.search-no-resul

.single .site-content,
.page .site-content {
padding-bottom: var(--theme-spacing-fluid-large);
overflow: hidden; }
padding-bottom: var(--theme-spacing-fluid-large); }

.page:not(.has-hero) .site-content {
padding-top: var(--theme-spacing-fluid-large); }
Expand Down
1 change: 1 addition & 0 deletions dist/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1439,6 +1439,7 @@ function () {
key: "render",
value: function render() {
if (!this.element) return;
window.document.body.style.setProperty('--site-header-height', this.visibleHeaderHeight * 0.75 + this.promoBarHeight + 'px');
this.updateMobileNavigationOffset();
this.updateMobileHeaderState();
this.updateDesktopHeaderState(false);
Expand Down
2 changes: 1 addition & 1 deletion dist/js/scripts.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions inc/integrations/novablocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function rosa2_novablocks_setup() {
'navigation',
'opentable',
'openhours',
'posts-collection',
'slideshow',
) );
}
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ class Header {
render() {
if ( ! this.element ) return;

window.document.body.style.setProperty( '--site-header-height', ( this.visibleHeaderHeight * 0.75 ) + this.promoBarHeight + 'px' );

this.updateMobileNavigationOffset();
this.updateMobileHeaderState();
this.updateDesktopHeaderState(false);
Expand Down
2 changes: 1 addition & 1 deletion src/scss/block-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ h1, h2, h3, h4, h5, h6,
line-height: 1.4;
}

&:not(.is-selected) .editor-post-title__input {
&:not(.is-selected) .editor-post-title__input {
border-bottom: 1px dashed rgba(123,134,162,.3);
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/scss/blocks/nova-blocks/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
}
}

.novablocks-grid__column:first-child .novablocks-grid__area:first-child:last-child {
top: calc( var(--novablocks-grid-spacing) * var(--novablocks-grid-spacing-modifier, 1) + var(--site-header-height, 0) );
}

// Nova - Food Menu
@import "food-menu/style";

Expand Down
6 changes: 6 additions & 0 deletions src/scss/blocks/nova-blocks/cards-collection/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@
}
}
}

// remove padding added on all inner containers
.novablocks-card__inner-container[class] {
padding-left: 0;
padding-right: 0;
}
9 changes: 0 additions & 9 deletions src/scss/components/_spacing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,3 @@
--block-top-spacing: 0;
}
}

.wp-block-column,
[class*="__inner-container"] {

> :not(:first-child) {
--novablocks-element-spacing-multiplier: 0.5;
}
}

2 changes: 1 addition & 1 deletion src/scss/components/site-header/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $site-header-transition-speed: .3s !default;
pointer-events: auto;

.has-site-header-fixed .site-header--scrolled & {
min-height: calc( var(--theme-header-height) * var(--theme-header-srolled-ratio, 0.75) )
min-height: calc( var(--theme-header-height) * var(--theme-header-scrolled-ratio, 0.75) )
}
}

Expand Down
1 change: 0 additions & 1 deletion src/scss/theme/pages/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

.site-content {
padding-bottom: var(--theme-spacing-fluid-large);
overflow: hidden;
}
}

Expand Down
6 changes: 1 addition & 5 deletions style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,7 @@ ul.menu a,
transition-property: min-height, color, background-color;
pointer-events: auto; }
.has-site-header-fixed .site-header--scrolled .site-header__wrapper {
min-height: calc( var(--theme-header-height) * var(--theme-header-srolled-ratio, 0.75)); }
min-height: calc( var(--theme-header-height) * var(--theme-header-scrolled-ratio, 0.75)); }
.site-header__inner-container {
width: 100%; }
.site-header__wrapper:after {
Expand Down Expand Up @@ -2469,10 +2469,6 @@ span.page-numbers {
.novablocks-media--blog[class][class][class]:first-child {
--block-top-spacing: 0; }

.wp-block-column > :not(:first-child),
[class*="__inner-container"] > :not(:first-child) {
--novablocks-element-spacing-multiplier: 0.5; }

.novablocks-hero__inner-container > .c-headline .c-headline__primary,
.novablocks-hero__inner-container > .c-headline .c-headline__secondary {
opacity: 0; }
Expand Down
6 changes: 1 addition & 5 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,7 @@ ul.menu a,
transition-property: min-height, color, background-color;
pointer-events: auto; }
.has-site-header-fixed .site-header--scrolled .site-header__wrapper {
min-height: calc( var(--theme-header-height) * var(--theme-header-srolled-ratio, 0.75)); }
min-height: calc( var(--theme-header-height) * var(--theme-header-scrolled-ratio, 0.75)); }
.site-header__inner-container {
width: 100%; }
.site-header__wrapper:after {
Expand Down Expand Up @@ -2469,10 +2469,6 @@ span.page-numbers {
.novablocks-media--blog[class][class][class]:first-child {
--block-top-spacing: 0; }

.wp-block-column > :not(:first-child),
[class*="__inner-container"] > :not(:first-child) {
--novablocks-element-spacing-multiplier: 0.5; }

.novablocks-hero__inner-container > .c-headline .c-headline__primary,
.novablocks-hero__inner-container > .c-headline .c-headline__secondary {
opacity: 0; }
Expand Down

0 comments on commit 00af8e1

Please sign in to comment.