Commit 4f4486d4 authored by Sven Franck's avatar Sven Franck

added css for responsive_grid

parent f5422c86
......@@ -1389,6 +1389,171 @@ html .ui-filterable {
.list li a {
text-decoration: none;
}
/* responsive grid listview */
/* default */
.ui-listview.responsive_grid li .ui-btn .ui-li-icon-custom:after {
font-size: 1.25em;
padding: 0.5em 0;
}
/* First breakpoint is 48em (768px). 3 column layout. Tiles 250x250 pixels incl. margin at the breakpoint. */
@media ( min-width: 48em ) {
.ui-listview.responsive_grid li {
float: left;
width: 30.9333%; /* 33.3333% incl. 2 x 1.2% margin */
height: 14.5em; /* 232p */
margin: .5625em 1.2%;
}
.ui-listview.responsive_grid li > .ui-btn {
-webkit-box-sizing: border-box; /* include padding and border in height so we can set it to 100% */
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
height: 100%;
border-bottom-width: 1px;
}
.ui-listview.responsive_grid li.ui-li-has-thumb .ui-li-thumb,
.ui-listview.responsive_grid li.ui-li-has-icon .ui-li-icon-custom {
height: auto; /* To keep aspect ratio. */
max-width: 100% !important;
max-height: none;
}
/* Overwrite custom icon width 22px */
.ui-listview.responsive_grid li span.ui-li-icon-custom {
width: 100% !important;
}
/* Make all list items and anchors inherit the border-radius from the UL. */
.ui-listview.responsive_grid li,
.ui-listview.responsive_grid li .ui-btn,
.ui-listview.responsive_grid .ui-li-thumb,
.ui-listview.responsive_grid .ui-li-icon-custom {
-webkit-border-radius: inherit;
border-radius: inherit;
}
/* Hide the icon */
.ui-listview.responsive_grid .ui-btn-icon-right:after {
display: none;
}
/* Enlarge custom icon */
.ui-listview.responsive_grid li .ui-btn .ui-li-icon-custom:after {
font-size: 3em;
}
/* Align center */
.ui-listview.responsive_grid li > .ui-btn {
text-align: center;
}
/* Make text wrap. */
.ui-listview.responsive_grid h1,
.ui-listview.responsive_grid p {
white-space: normal;
overflow: visible;
position: absolute;
left: 0;
right: 0;
}
/* Text position */
.ui-listview.responsive_grid h1 {
font-size: 1.25em;
margin: 0;
padding: .125em 1em;
bottom: 40%;
}
.ui-listview.responsive_grid p {
font-size: 1em;
margin: 0;
padding: 0 1.25em;
min-height: 40%;
bottom: 0;
}
/* Semi transparent background and different position if there is a thumb. The button has overflow hidden so we don't need to set border-radius. */
.ui-listview.responsive_grid .ui-li-has-thumb h1,
.ui-listview.responsive_grid .ui-li-has-thumb p,
.ui-listview.responsive_grid .ui-li-has-icon h1,
.ui-listview.responsive_grid .ui-li-has-icon p,{
background: #111;
background: rgba(0,0,0,.8);
}
.ui-listview.responsive_grid .ui-li-has-thumb h1,
.ui-listview.responsive_grid .ui-li-has-icon h1 {
bottom: 35%;
}
.ui-listview.responsive_grid .ui-li-has-thumb p,
.ui-listview.responsive_grid .ui-li-has-icon p{
min-height: 35%;
}
/* ui-li-aside has class .ui-li-desc as well so we have to override some things. */
.ui-listview.responsive_grid .ui-li-aside {
padding: .125em .625em;
width: auto;
min-height: 0;
top: 0;
left: auto;
bottom: auto;
/* Custom styling. */
background: #990099;
background: rgba(153,0,153,.85);
-webkit-border-top-right-radius: inherit;
border-top-right-radius: inherit;
-webkit-border-bottom-left-radius: inherit;
border-bottom-left-radius: inherit;
-webkit-border-bottom-right-radius: 0;
border-bottom-right-radius: 0;
}
/* If you want to add shadow, don't kill the focus style.
.ui-listview.responsive_grid li {
-moz-box-shadow: 0px 0px 2px #111;
-webkit-box-shadow: 0px 0px 2px #111;
box-shadow: 0px 0px 2px #111;
}*/
/* Images mask the hover bg color so we give desktop users feedback by applying the focus style on hover as well.
.ui-listview.responsive_grid li > .ui-btn:hover {
-moz-box-shadow: 0px 0px 2px #33ccff;
-webkit-box-shadow: 0px 0px 2px #33ccff;
box-shadow: 0px 0px 2px #33ccff;
}
*/
/* Animate focus and hover style, and resizing. */
.ui-listview.responsive_grid li,
.ui-listview.responsive_grid .ui-btn {
-webkit-transition: all 500ms ease;
-moz-transition: all 500ms ease;
-o-transition: all 500ms ease;
-ms-transition: all 500ms ease;
transition: all 500ms ease;
}
}
/* Second breakpoint is 63.75em (1020px). 4 column layout. Tiles will be 250x250 pixels incl. margin again at the breakpoint. */
@media ( min-width: 63.75em ) {
/* Set a max-width for the last breakpoint to prevent too much stretching on large screens.
By setting the max-width equal to the breakpoint width minus padding we keep square tiles. */
.ui-listview.responsive_grid {
max-width: 62.5em; /* 1000px */
margin: 0 auto;
}
/* Enlarge custom icon */
.ui-listview.responsive_grid li .ui-btn .ui-li-icon-custom:after {
font-size: 4em;
}
/* Align center */
.ui-listview.responsive_grid li > .ui-btn {
text-align: center;
}
/* Overwrite custom icon width 22px */
.ui-listview.responsive_grid li span.ui-li-icon-custom {
width: 100% !important;
}
/* Because of the 1000px max-width the width will always be 230px (and margin left/right 10px),
but we stick to percentage values for demo purposes. */
.ui-listview.responsive_grid li {
width: 23%;
height: 230px;
margin: .625em 1%;
}
}
/* =========== */
/* listview */
html .ui-panel-inner .ui-listview .ui-li-divider {
font-weight: bold;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment