| ... |
... |
@@ -123,27 +123,34 @@ |
| 123 |
123 |
/* === WHY CHOOSE (widgets using Bootstrap grid) === */ |
| 124 |
124 |
.widgets { |
| 125 |
125 |
margin-top: 12px; |
| 126 |
|
- |
| 127 |
|
- /* Flex layout = equal-height columns */ |
| 128 |
128 |
display: flex; |
| 129 |
129 |
flex-wrap: wrap; |
| 130 |
130 |
|
| 131 |
|
- /* Cancel Bootstrap's outer gutters so cards align with heading */ |
|
129 |
+ /* keep alignment with container */ |
| 132 |
132 |
margin-left: -15px; |
| 133 |
133 |
margin-right: -15px; |
| 134 |
134 |
|
| 135 |
135 |
.widget { |
| 136 |
|
- /* Bootstrap grid classes (col-sm-6, col-md-3) still apply padding */ |
|
134 |
+ /* add spacing between widgets */ |
|
135 |
+ margin: 0 8px 16px; |
|
136 |
+ &:first_child { |
|
137 |
+ margin-left: 0; |
|
138 |
+ } |
|
139 |
+ &:last-hild { |
|
140 |
+ margin-right: 0; |
|
141 |
+ } |
|
142 |
+ |
|
143 |
+ /* equal-height flex card */ |
| 137 |
137 |
display: flex; |
| 138 |
138 |
flex-direction: column; |
| 139 |
139 |
height: 100%; |
| 140 |
140 |
|
| 141 |
|
- /* Card design */ |
|
148 |
+ /* card look */ |
|
149 |
+ padding: 18px; |
| 142 |
142 |
background: #fff; |
| 143 |
143 |
border: 1px solid @line; |
| 144 |
144 |
border-radius: @radius; |
| 145 |
145 |
box-shadow: @shadow-sm; |
| 146 |
|
- padding: 18px; |
| 147 |
147 |
transition: transform .18s ease, box-shadow .18s ease; |
| 148 |
148 |
|
| 149 |
149 |
&:hover { |
| ... |
... |
@@ -158,14 +158,8 @@ |
| 158 |
158 |
padding-bottom: 6px; |
| 159 |
159 |
margin-bottom: 8px; |
| 160 |
160 |
border-bottom: 1px solid fade(@line, 60%); |
| 161 |
|
- |
| 162 |
162 |
i { color: @brand; } |
| 163 |
|
- |
| 164 |
|
- h4 { |
| 165 |
|
- margin: 0; |
| 166 |
|
- line-height: 1.2; |
| 167 |
|
- color: @text; |
| 168 |
|
- } |
|
169 |
+ h4 { margin: 0; line-height: 1.2; color: @text; } |
| 169 |
169 |
} |
| 170 |
170 |
|
| 171 |
171 |
p { |
| ... |
... |
@@ -174,12 +174,6 @@ |
| 174 |
174 |
line-height: 1.45; |
| 175 |
175 |
} |
| 176 |
176 |
} |
| 177 |
|
- |
| 178 |
|
- @media (max-width: 767px) { |
| 179 |
|
- .widget { |
| 180 |
|
- margin-bottom: 16px; /* spacing between stacked items */ |
| 181 |
|
- } |
| 182 |
|
- } |
| 183 |
183 |
} |
| 184 |
184 |
|
| 185 |
185 |
|