-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
Needs DecisionNeeds a decision to be actionable or relevantNeeds a decision to be actionable or relevant[Type] Developer DocumentationDocumentation for developersDocumentation for developers[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Description
The documentation https://wordpress.org/gutenberg/handbook doesn't contain information on how to style alignfull
and alignwide
.
jQuery('body').width()
returns1884
window.innerWidth
returns1901
When I do:
.alignfull {
margin-left: calc( -100vw / 2 + 100% / 2 );
margin-right: calc( -100vw / 2 + 100% / 2 );
max-width: 100vw;
}
then the resulting container is 1901px
wide (thus producing horizontal scrollbar). To make it right it would have to be 1884px
.
Can you please clarify how themes should style alignfull
?
These places (top google results) contain wrong styling information:
- https://themehybrid.com/weblog/align-wide-and-full-classes
- https://themeshaper.com/2018/02/15/styling-themes-for-gutenberg/
- https://richtabor.com/gutenberg-image-alignments/
- https://jasonyingling.me/implementing-gutenberg-image-alignment-options-theme/
- https://www.billerickson.net/getting-your-theme-ready-for-gutenberg/
- https://generatepress.com/forums/topic/styling-for-gutenberg-alignfull-and-alignwide/
- I can't find any blog with correct information?
skorasaurus, jdebuchy, strarsis and adrianenriquez
Metadata
Metadata
Assignees
Labels
Needs DecisionNeeds a decision to be actionable or relevantNeeds a decision to be actionable or relevant[Type] Developer DocumentationDocumentation for developersDocumentation for developers[Type] EnhancementA suggestion for improvement.A suggestion for improvement.