_layout.scss 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Layout styles
  2. // ---------------------------------------/
  3. // Layout from Primer (https://github.com/primer/primer/blob/master/scss/_layout.scss)
  4. // Fixed-width, centered column for site content.
  5. .container {
  6. width: $container-width;
  7. margin-right: auto;
  8. margin-left: auto;
  9. @include clearfix;
  10. }
  11. // Grid system
  12. //
  13. // Create rows with `.columns` to clear the floated columns and outdent the
  14. // padding on `.column`s with negative margin for alignment.
  15. .columns {
  16. margin-right: -$grid-gutter;
  17. margin-left: -$grid-gutter;
  18. @include clearfix;
  19. }
  20. // Base class for every column (requires a column width from below)
  21. .column {
  22. float: left;
  23. padding-right: $grid-gutter;
  24. padding-left: $grid-gutter;
  25. }
  26. // Column widths
  27. .one-third {
  28. width: 33.333333%;
  29. }
  30. .two-thirds {
  31. width: 66.666667%;
  32. }
  33. .one-fourth {
  34. width: 25%;
  35. }
  36. .one-half {
  37. width: 50%;
  38. }
  39. .three-fourths {
  40. width: 75%;
  41. }
  42. .one-fifth {
  43. width: 20%;
  44. }
  45. .four-fifths {
  46. width: 80%;
  47. }
  48. // Single column hack
  49. .single-column {
  50. padding-right: $grid-gutter;
  51. padding-left: $grid-gutter;
  52. }
  53. // Equal width columns via table sorcery.
  54. .table-column {
  55. display: table-cell;
  56. width: 1%;
  57. padding-right: $grid-gutter;
  58. padding-left: $grid-gutter;
  59. vertical-align: top;
  60. }