-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from pixelgrade/fix/novablocks-integration
Fix Nova Blocks integration
- Loading branch information
Showing
21 changed files
with
376 additions
and
479 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@media only screen and (min-width: 1000px) { | ||
|
||
.site-header { | ||
|
||
ul.menu, | ||
.menu > ul { | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,58 @@ | ||
@at-root { | ||
|
||
:root { | ||
--novablocks-spacing: var(--theme-spacing-fluid-medium); | ||
--novablocks-block-content-padding: var(--theme-spacing-fluid-large); | ||
} | ||
// hack to contain negative margin-top of .novablocks-media__layout | ||
.novablocks-media > .wp-block-group__inner-container { | ||
padding-top: 1px; | ||
} | ||
|
||
.novablocks-media__content { | ||
max-width: 100%; | ||
@include apply-font(body); | ||
|
||
--novablocks-block-content-padding: var(--novablocks-spacing); | ||
|
||
&[class] { | ||
flex-basis: calc(50% - var(--novablocks-media-spacing)); | ||
} | ||
} | ||
|
||
.novablocks-media__aside { | ||
|
||
// 0.5px to help Edge resolve the calc | ||
flex-basis: calc(50% + var(--novablocks-media-spacing) - 0.5px); | ||
&[class] { | ||
// 0.5px to help Edge resolve the calc | ||
flex-basis: calc(50% + var(--novablocks-media-spacing) - 0.5px); | ||
} | ||
|
||
.novablocks-media:not(.novablocks-media--no-thumbnail) & { | ||
min-height: 15em; | ||
} | ||
} | ||
|
||
.novablocks-media__image { | ||
.novablocks-media__image { | ||
|
||
svg { | ||
@include image-cover; | ||
object-fit: contain; | ||
} | ||
svg { | ||
@include image-cover; | ||
object-fit: contain; | ||
} | ||
} | ||
|
||
.block-is-moderate { | ||
--novablocks-block-background-color: var(--current-light-tertiary); | ||
.novablocks-block__content { | ||
|
||
@include above(tablet) { | ||
--novablocks-block-content-padding: var(--novablocks-spacing); | ||
} | ||
} | ||
|
||
.novablocks-media--blog[class] { | ||
--novablocks-block-content-box-shadow: none; | ||
--novablocks-block-background-color: var(--current-light-tertiary); | ||
|
||
.novablocks-media__content { | ||
margin-bottom: 0; | ||
.novablocks-media__image { | ||
height: 100%; | ||
min-height: 400px; | ||
} | ||
|
||
.novablocks-media__aside { | ||
order: 0; | ||
} | ||
|
||
&.has-image-on-the-left { | ||
.novablocks-media__layout { | ||
flex-direction: row-reverse; | ||
} | ||
} | ||
} | ||
|
||
@include below(tablet) { | ||
|
||
.novablocks-media__content { | ||
flex-basis: 100%; | ||
} | ||
|
||
.novablocks-block[class][class] { | ||
--novablocks-block-padding: 0; | ||
--novablocks-block-background-color: transparent; | ||
--novablocks-block-content-text-color: var(--current-dark-secondary); | ||
} | ||
|
||
.novablocks-block__content { | ||
--novablocks-block-content-padding: 0; | ||
box-shadow: none; | ||
&.has-image-on-the-left .novablocks-media__layout { | ||
flex-direction: row-reverse; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.novablocks-block[class] { | ||
padding: var(--novablocks-block-padding) 0; | ||
color: var(--novablocks-block-text-color); | ||
background-color: var(--novablocks-block-background-color); | ||
} | ||
|
||
.novablocks-block__content { | ||
position: relative; | ||
|
||
color: var(--novablocks-block-content-text-color); | ||
transform: translateZ(0); | ||
|
||
&[class] { | ||
padding: var(--novablocks-block-content-padding); | ||
} | ||
|
||
@include above(tablet) { | ||
box-shadow: var(--novablocks-block-content-box-shadow); | ||
|
||
&:after { | ||
content: ''; | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
z-index: -1; | ||
|
||
display: block; | ||
background-color: var(--novablocks-block-content-background-color); | ||
opacity: var(--novablocks-block-content-background-opacity); | ||
pointer-events: none; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.block-is-moderate, | ||
.block-is-highlighted { | ||
--novablocks-block-padding: var(--novablocks-spacing); | ||
} | ||
|
||
@include above(tablet) { | ||
|
||
.content-is-moderate { | ||
--novablocks-block-content-padding: var(--novablocks-spacing); | ||
--novablocks-block-content-background-color: var(--current-light-primary); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.novablocks-media__image { | ||
position: relative; | ||
|
||
img { | ||
@include image-cover; | ||
} | ||
} | ||
|
||
.novablocks-media__inner-container { | ||
display: flex; | ||
height: 100%; | ||
flex-direction: column; | ||
justify-content: center; | ||
|
||
word-break: break-word; | ||
} | ||
|
||
.novablocks-media__layout { | ||
margin-top: calc( -1 * var(--novablocks-media-spacing) ); | ||
margin-left: calc( -1 * var(--novablocks-media-spacing) ); | ||
|
||
> * { | ||
padding-left: var(--novablocks-media-spacing); | ||
margin-top: var(--novablocks-media-spacing); | ||
} | ||
|
||
@include above(tablet) { | ||
display: flex; | ||
flex-wrap: wrap; | ||
|
||
> * { | ||
flex: 1 0 50%; | ||
} | ||
} | ||
} |
Oops, something went wrong.