Skip to content

Commit

Permalink
css: tiles: don't stretch in horizontal list
Browse files Browse the repository at this point in the history
- center thumbnail if too narrow
- circular fading background
- set white background (for img for images with transparency)

[delivers #89864088]
  • Loading branch information
eins78 committed Apr 17, 2015
1 parent c4c146e commit c42e8ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/combos/_ui-resources-tiles.sass
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

.ui-tile__image
+dimension(100%,auto)
background-color: white // for images with transparency

&.large
.ui-resources-page-items
Expand Down Expand Up @@ -92,18 +93,21 @@
.ui-tile
.ui-tile__image
+dimension(auto, 200px)
min-width: auto

&.small
height: 210px
.ui-tile
.ui-tile__image
+dimension(auto, 125px)
min-width: auto

&.large
height: 385px
.ui-tile
.ui-tile__image
+dimension(auto, 300px)
min-width: auto
/* Layout switching
*-----------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions app/assets/stylesheets/components/_ui-tiles.sass
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
.ui-tile__body
line-height: 0
background-color: rgba(0, 0, 0, 0.3)
box-shadow: 0 0 150px hsl(0, 0%, 34%) inset
text-align: center // for narrow thumbnails

.ui-tile__head
+position-top-left(0,0)
Expand Down Expand Up @@ -106,6 +108,7 @@
.ui-tile__thumbnail
display: block
vertical-align: middle

.ui-tile__image
height: 400px
Expand Down

0 comments on commit c42e8ca

Please sign in to comment.