-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for Gutenberg : cover image and other blocks #702
Comments
Cover Image
cover image can be used :
The overriden style will be applied only when a cover image is detected in the content <= how ? Enlargement |
About the cover image: Basically we have to climb too much in the html tree to remove the "contained width" hence add the max-width to too many elements, not only the article content elements but also author bio, related posts, comments etc, that will really create a big mess to me. Also we have to force these elements box-sizing to be border-box, as we don't want any horizontal padding make their width grow. Additionally: floating elements inside the article content (e.g. common alignright/alignleft) will go to the "full-right/left" of the page, how do we control them? The thing is that themes like Hueman are by design not compatible with the gb cover image, we should change the html. I would rather go with my original "soft CSS + JS" approach:
In most of the cases this would be already enough as you will lose at most around 15px (browser scrollbar common width) on the right and on the left of the "cover" image background, which is totally fine, since it's a background cover image (hence you'll already lose part of the image on the top/bottom by design). Anyway... js will come handy:
|
Let's go with your solution. |
Have not found yet a good way, using the guten-api, to understand if a specific block is in the content. I say "might" because I don't know why do we have this rule: Consideration over alignwide and alignfull:
|
let me see, I'm on it |
Ah great, no way.. Looks like an issue with chrome when using the transform translate, while firefox just "suppresses" the fixed background position. |
ah not cool. |
Totally not cool :@ |
What do you think about: You know I always would like to avoid the JS styling when there are CSS/html alternatives... but in this case I don't see them... |
I'm on a Nimble release right now, but I'll check it in a moment. |
yes tests passed on my side, alignfull: fixed and non |
Works for me too. Well done. |
Yes, will then push a separate PR for other blocks if needed, so that we can better exclude/include only the changes we want. |
…gutenberg#10659, but posts created with the former cover-image block will still use the wp-block-cover-image css class related to #702
Hi @eri-trabiccolo , I don't know if you are aware of this change in the latest version of Gutenberg... |
@eri-trabiccolo forget my request about the Customizr PR's, I'll do it ! |
I can if you want, let me know. |
I'm on it. thanks |
Ok |
But this is absolutely out of head. |
yes. |
following: we seem to have treated only the cover image block (I actually don't think when I did this the image block could be wide/full-width ... but I might be wrong), |
see list of succesfully tested blocks with: at: |
I've also found that a pretty long gutenberg post gets cut-off in the featured posts slider when displaying the full content... Not sure why, needs investigation. |
ok...weird ! |
The text was updated successfully, but these errors were encountered: