Skip to content

Commit

Permalink
fixed : the cover image block has been renamed cover. @see WordPress/…
Browse files Browse the repository at this point in the history
…gutenberg#10659, but posts created with the former cover-image block will still use the wp-block-cover-image css class

related to #702
  • Loading branch information
noErrdev committed Oct 25, 2018
1 parent 148086f commit 8b09b81
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 10 additions & 4 deletions assets/front/css/_parts/0_5_single_post_page.css
Original file line number Diff line number Diff line change
Expand Up @@ -283,26 +283,32 @@ a + span.hu-external:after {
overflow: visible;
}
/* alignfull */
.full-width.col-1c .wp-block-cover-image.alignfull {
/*
the cover image block has been renamed cover. @see https://github.com/WordPress/gutenberg/pull/10659
but posts created with the former cover-image block will still use the wp-block-cover-image class
*/
.full-width.col-1c .wp-block-cover-image.alignfull, .full-width.col-1c .wp-block-cover.alignfull {
width: 100vw;
max-width: 100vw;
position: relative;
margin-left: 0;
margin-right: 0;
}
.full-width.col-1c .wp-block-cover-image.alignfull:not(.has-parallax) {
.full-width.col-1c .wp-block-cover-image.alignfull:not(.has-parallax), .full-width.col-1c .wp-block-cover.alignfull:not(.has-parallax) {
left: 50%;
-moz-transform: translateX(-50);
-webkit-transform: translateX(-50);
transform: translateX(-50%);
}
.full-width.col-1c .wp-block-cover-image.alignfull.has-parallax:not(.hu-alignfull-p) {
.full-width.col-1c .wp-block-cover-image.alignfull.has-parallax:not(.hu-alignfull-p), .full-width.col-1c .wp-block-cover.alignfull.has-parallax:not(.hu-alignfull-p) {
width: 100%;
}
/* alignwide and alignfull in boxed layouts */
/* only reset the .pad container horizontal padding*/
.entry-inner > .wp-block-cover-image.alignfull,
.entry-inner > .wp-block-cover-image.alignwide {
.entry-inner > .wp-block-cover-image.alignwide,
.entry-inner > .wp-block-cover.alignfull,
.entry-inner > .wp-block-cover.alignwide {
margin-right: -30px;
margin-left: -30px;
clear: both;
Expand Down
3 changes: 2 additions & 1 deletion assets/front/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ if (!Array.from) {
};
}());
}

(function ( $ ) {

var pluginPrefix = 'original',
Expand Down Expand Up @@ -4046,7 +4047,7 @@ var czrapp = czrapp || {};
);
},
gutenbergAlignfull : function() {
var _coverImageSelector = '.full-width.col-1c .wp-block-cover-image.alignfull',
var _coverImageSelector = [ '.full-width.col-1c .wp-block-cover-image.alignfull', '.full-width.col-1c .wp-block-cover.alignfull' ].join(','),
_coverWParallaxImageSelector = _coverImageSelector + '.has-parallax',
_classParallaxTreatmentApplied = 'hu-alignfull-p',
_styleId = 'hu-gutenberg-alignfull',
Expand Down

0 comments on commit 8b09b81

Please sign in to comment.