Changeset 12096 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/css/components/_card.scss
- Timestamp:
- 09/28/2022 11:18:13 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/css/components/_card.scss
r12067 r12096 1 .card { 1 .card, 2 .card.button { 2 3 background-color: #fbfbfc; 3 4 border: 1px solid #ccd0d4; 4 5 border-radius: 3px; 5 6 color: #555d66; 6 margin-bottom: 0.5rem;7 7 padding: 1.75rem; 8 8 position: relative; … … 10 10 /* Fix over-specific rule in the parent theme. */ 11 11 body:not(.single):not(.search) .site-main &.post { 12 margin-bottom: 0.5rem; 12 margin-bottom: 0; 13 max-width: initial; 13 14 } 14 15 … … 106 107 } 107 108 109 @mixin card-grid_1 { 110 grid-template-columns: 1fr; 111 } 112 113 @mixin card-grid_2 { 114 grid-template-columns: 1fr 1fr; 115 } 116 108 117 .card-grid { 109 118 margin: 1.5rem 0; 119 display: grid; 120 gap: 1rem; 121 grid-auto-rows: min-content; 110 122 111 @media only screen and (min-width: $breakpoint-tablet) { 112 display: flex; 113 flex-direction: row; 114 flex-wrap: wrap; 115 align-content: flex-start; 116 justify-content: space-between; 117 margin-left: -0.5rem; /* Offset the padding in the grid */ 118 margin-right: -0.5rem; /* Offset the padding in the grid */ 123 @include card-grid_1(); 119 124 120 > * { 121 margin: 0.5rem; 122 } 125 &_2 { 123 126 127 @include card-grid_2(); 128 } 129 130 &_4 { 131 grid-template-columns: 1fr 1fr 1fr 1fr; 132 } 133 134 @media only screen and (max-width: $breakpoint-tablet-below) { 124 135 &_2 { 125 > * { 126 flex-grow: 0; 127 flex-shrink: 0; 128 flex-basis: 48%; 129 } 136 137 @include card-grid_1(); 130 138 } 131 139 132 140 &_4 { 133 > * { 134 flex-grow: 0; 135 flex-shrink: 0; 136 flex-basis: calc(25% - 1rem); 137 } 141 142 @include card-grid_2(); 138 143 } 144 } 139 145 140 &.gap-64 { 141 margin-top: 4rem; 142 margin-bottom: 0.25rem; 146 @media only screen and (max-width: $breakpoint-mobile) { 147 &_4 { 148 149 @include card-grid_1(); 143 150 } 144 151 }
Note: See TracChangeset
for help on using the changeset viewer.