Created
August 24, 2021 14:15
-
-
Save akalata/beb36414c0aeaa1f21b673221628fc09 to your computer and use it in GitHub Desktop.
SML Layout containers
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
Current state: Full bleed by default, anything in the main content area needs to set a class to fix-width and center its content. | |
<div> | |
<main> | |
<div class="bg-color-bleeds"> | |
<div class="container mx-auto">Content is fixed width and centered</div> | |
</div> | |
</main> | |
<div> | |
Pages with a sidebar (right now, only search results) include a container to wrap the sidebar and main content areas | |
<div class="container mx-auto"> | |
<main class="order-2"> | |
<div>Main content</div> | |
</main> | |
<aside class="order-first"> | |
<div>Sidebar content</div> | |
</aside> | |
</div> | |
Proposal: Always include the container classes, except where we know the page components will be full-bleed and have their own containers applied. | |
{% if page_full_bleed != true %} | |
<div class="container mx-auto"> | |
{% else %} | |
<div> | |
{% endif %} | |
<main> | |
<div>Main content, centered without us needing to specify anything</div> | |
</main> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment