| ... |
... |
@@ -126,26 +126,22 @@ |
| 126 |
126 |
display: flex; |
| 127 |
127 |
flex-wrap: wrap; |
| 128 |
128 |
|
| 129 |
|
- /* keep alignment with container */ |
| 130 |
|
- margin-left: -15px; |
| 131 |
|
- margin-right: -15px; |
| 132 |
|
- |
| 133 |
133 |
.widget { |
| 134 |
|
- /* add spacing between widgets */ |
|
130 |
+ box-sizing: border-box; |
|
131 |
+ |
|
132 |
+ /* Desktop (md+): 4 per row, with 8px side gaps */ |
|
133 |
+ flex: 0 0 calc(25% - 16px); |
|
134 |
+ max-width: calc(25% - 16px); |
| 135 |
135 |
margin: 0 8px 16px; |
| 136 |
|
- &:first-child { |
| 137 |
|
- margin-left: 0; |
| 138 |
|
- } |
| 139 |
|
- &:last-child { |
| 140 |
|
- margin-right: 0; |
| 141 |
|
- } |
| 142 |
142 |
|
| 143 |
|
- /* equal-height flex card */ |
|
137 |
+ /* First: no left margin; last: no right margin */ |
|
138 |
+ &:first-child { margin-left: 0; } |
|
139 |
+ &:last-child { margin-right: 0; } |
|
140 |
+ |
|
141 |
+ /* Card styling */ |
| 144 |
144 |
display: flex; |
| 145 |
145 |
flex-direction: column; |
| 146 |
146 |
height: 100%; |
| 147 |
|
- |
| 148 |
|
- /* card look */ |
| 149 |
149 |
padding: 18px; |
| 150 |
150 |
background: #fff; |
| 151 |
151 |
border: 1px solid @line; |
| ... |
... |
@@ -165,8 +165,9 @@ |
| 165 |
165 |
padding-bottom: 6px; |
| 166 |
166 |
margin-bottom: 8px; |
| 167 |
167 |
border-bottom: 1px solid fade(@line, 60%); |
| 168 |
|
- i { color: @brand; } |
| 169 |
|
- h4 { margin: 0; line-height: 1.2; color: @text; } |
|
164 |
+ |
|
165 |
+ i { color: @brand; } |
|
166 |
+ h4 { margin: 0; line-height: 1.2; color: @text; } |
| 170 |
170 |
} |
| 171 |
171 |
|
| 172 |
172 |
p { |
| ... |
... |
@@ -174,6 +174,15 @@ |
| 174 |
174 |
color: @muted; |
| 175 |
175 |
line-height: 1.45; |
| 176 |
176 |
} |
|
174 |
+ |
|
175 |
+ |
|
176 |
+ |
|
177 |
+ /* Mobile (xs): full width stacked */ |
|
178 |
+ @media (max-width: 767px) { |
|
179 |
+ flex: 0 0 100%; |
|
180 |
+ max-width: 100%; |
|
181 |
+ margin: 0 0 16px 0; |
|
182 |
+ } |
| 177 |
177 |
} |
| 178 |
178 |
} |
| 179 |
179 |
|