Skip to content

Commit 075c55e

Browse files
committed
Change width to max-width where possible
1 parent a9a920e commit 075c55e

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

assets/style.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,23 @@ a:hover {
8686
margin: 0 auto;
8787
}
8888
.feature-image {
89-
width: 420px;
89+
max-width: 420px;
9090
display: block;
9191
margin: 0 auto;
9292
}
9393
}
9494

9595
@media (min-width: 820px) {
9696
.features {
97-
width: 800px;
97+
max-width: 800px;
9898
}
9999
.feature {
100100
position: relative;
101101
margin-top: 1em;
102102
margin-bottom: 4em;
103103
}
104104
.feature-description {
105-
width: 340px;
105+
max-width: 340px;
106106
}
107107
.feature-image {
108108
position: absolute;
@@ -228,7 +228,7 @@ Not really any of those on the website though AFAIK.
228228
padding-top: 1em;
229229
color: #ddd;
230230
display: block;
231-
width: 600px;
231+
max-width: 600px;
232232
margin: 0 auto;
233233
text-align: right;
234234
}

src/pages/home.elm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ viewFeature feature =
9595
, a [ class "feature-image"
9696
, href feature.link
9797
]
98-
[ img [src feature.image] []
98+
[ img [src feature.image
99+
, style [("width", "100%")]
100+
] []
99101
]
100102
]
101103

@@ -185,6 +187,7 @@ example imgSrc demo code =
185187
[ img
186188
[ src ("/assets/examples/" ++ imgSrc ++ ".png")
187189
, alt imgSrc
190+
, style [("width", "100%")]
188191
]
189192
[]
190193
]
@@ -207,7 +210,7 @@ fluidList itemWidth maxColumns itemList =
207210

208211
bulletStyle =
209212
[ "display" => "inline-block"
210-
, "width" => toPx itemWidth
213+
, "max-width" => toPx itemWidth
211214
, "vertical-align" => "top"
212215
, "text-align" => "left"
213216
, "margin" => ("0 " ++ toPx gutter)
@@ -285,7 +288,7 @@ company name website extension =
285288
[ a [ href website ]
286289
[ div
287290
[ style
288-
[ "width" => "100%"
291+
[ "width" => "200px"
289292
, "height" => "100px"
290293
, "background-image" => ("url('" ++ imgSrc ++ "')")
291294
, "background-repeat" => "no-repeat"
@@ -295,6 +298,3 @@ company name website extension =
295298
[]
296299
]
297300
]
298-
299-
300-

src/shared/Center.elm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ markdown width string =
1515
style width =
1616
Attr.style
1717
[ "display" => "block"
18-
, "width" => width
18+
, "max-width" => width
1919
, "margin" => "0 auto"
20-
]
20+
]

0 commit comments

Comments
 (0)