Skip to content

Any good way to set margin: 0 auto on author-editable responsive container? #1383

Answered by CezCz
ky940819 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Kyle,

First of all it is important to get into "Responsive Grid is a blackbox" thinking. This way we do not depend on anything from it and when it changes we do not suffer. This means that we should either embed ourselves inside of the RG or wrap it. Unfortunately a common, however potentially very harmful approach, is to "try to live" alongside with RG (in the same node), such pattern is strongly unadvised.

The snaplines and stripes, these are attaching and drawing based on the overlay size which is based on the editable itself.
That means if you can manipulate "reported" size of the editable (i.e embed the editable node inside this .cmp-container wrapper) it will paint just the way y…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vladbailescu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants