Guest User

Untitled

a guest
Feb 16th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. // Article Grid
  2. //
  3. // The Article Grid is a CSS Grid algorithm specifically created for the single article layout.
  4. // It supports a side area called `social` that snaps to the second row on the left at desktop-xl
  5. // in response to `author` becoming a full row. On small screens it is single column.
  6. //
  7. // The Article Grid algorithm is only responsible for position the _outer most_ elements of
  8. // the single article contents.
  9. //
  10. // Markup: a-article-grid.html
  11. //
  12. // Style Guide: Algorithms.ArticleGrid
  13.  
  14. @import '~@setup';
  15.  
  16. .a-article-grid {
  17.  
  18. @supports( display: grid ) {
  19. display: grid;
  20. grid-gap: $spacer-050;
  21. grid-template-columns: 100%;
  22.  
  23. @include breakpoint( tablet ) {
  24. grid-template-columns: repeat( 2, 1fr );
  25. grid-template-rows: repeat( 3, auto );
  26. grid-gap: $spacer-1;
  27. }
  28.  
  29. }
  30.  
  31. @include breakpoint( desktop-xl ) {
  32. @supports( display: grid ) {
  33. grid-template-columns: repeat( 6, 1fr );
  34. grid-column-gap: $spacer-2;
  35. }
  36. }
  37.  
  38. }
  39.  
  40. .a-article-grid__main,
  41. .a-article-grid__header {
  42. @include breakpoint( tablet ) {
  43. @supports( display: grid ) {
  44. grid-column: 1 / -1;
  45. }
  46. }
  47. }
  48.  
  49. .a-article-grid__main {
  50. width: 100%;
  51.  
  52. @include breakpoint( desktop-max ) {
  53. display: initial; // This resets and issue with pmc-a-grid and resizing images that have inline widths larger than the viewport.
  54. }
  55.  
  56. @include breakpoint( desktop-xl ) {
  57. @supports( display: grid ) {
  58. width: initial;
  59. grid-column: 2 / -1;
  60. }
  61. }
  62. }
  63.  
  64. .a-article-grid__author {
  65.  
  66. @include breakpoint( desktop-xl ) {
  67. @supports( display: grid ) {
  68. grid-column: 1 / -1;
  69. }
  70. }
  71. }
  72.  
  73. .a-article-grid__author,
  74. .a-article-grid__social {
  75.  
  76. @include breakpoint( mobile-max ) {
  77. display: flex;
  78. justify-content: center;
  79. }
  80.  
  81. @include breakpoint( tablet ) {
  82. float: left;
  83. width: calc( 50% - #{$spacer-1} );
  84.  
  85. @supports( display: grid ) {
  86. width: initial;
  87. }
  88. }
  89. }
  90.  
  91. .a-article-grid__social {
  92. @include clearfix;
  93. }
Add Comment
Please, Sign In to add comment