
#Two column responsive layout template full#
Creates a wrapper for a series of rows // $container-size can be mobile, mobile-lg, tablet, tablet-lg, desktop, desktop-lg, or widescreen grid-container grid-container ( $container-size ) // Creates a wrapper for a series of columns grid-row // Specify the width between columns // $gap-size can be sm, md, lg, 2px, 05, 1, 3, 4, 6 grid-gap grid-gap ( $gap-size ) // Make the element full-width u-width ( full ) // Specify the number of columns the element should span // $columns can be auto, fill, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 grid-col grid-col ( $columns ) // Get fancy by offsetting or changing the display order // $offset can be none, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 grid-offset ( $offset ) // $order can be first, last, initial, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 u-order ( $order ) Example usage Mixins can be used in conjunction with grid variables to add grid functionality to semantic component Sass. $theme-column-gap-sm : 2px $theme-column-gap-md : 2 $theme-column-gap-lg : 3 $theme-column-gap-mobile : 2 $theme-column-gap-desktop : 4 $theme-grid-container-max-width : 'desktop' $theme-site-margins-breakpoint : 'desktop' $theme-site-margins-width : 4 $theme-site-margins-mobile-width : 2 uswds-theme-utilities.scss // Turn on or off breakpoints $theme-utility-breakpoints : ( 'card' : false, // 160px 'card-lg' : false, // 240px 'mobile' : false, // 320px 'mobile-lg' : true, // 480px 'tablet' : true, // 640px 'tablet-lg' : false, // 880px 'desktop' : true, // 1024px 'desktop-lg' : false, // 1200px 'widescreen' : false, // 1400px ) Mixins uswds-theme-spacing.scss // Values are set as units tokens.

We use variables to generate the predefined grid classes documented on this page, as well as for the custom mixins noted under USWDS-theme-spacing.scss and USWDS-theme-utilities.scss. Variables and maps determine the number of columns, gutter width, and media-query point at which to begin floating columns. USWDS also provides grid mixins for adding grid functionality to custom semantic component CSS. When generating your CSS from USWDS source files, you have the option of customizing many system defaults by modifying project theme variables.

If you would like the grid to span the full width of the page, do not use grid-container.
#Two column responsive layout template code#
This example code creates three equal-width columns on tablet, desktop, and widescreen devices by using our predefined grid classes. tablet:grid-col tablet:grid-col tablet:grid-col Sample contract language for 21st Century IDEA
