Files
ionic-framework/ionic/components/item/item.scss
2015-07-31 18:22:38 -05:00

254 lines
3.6 KiB
SCSS

// Item
// --------------------------------------------------
// Core structure only, dimensions belong in platform specific extensions
.item {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
margin: 0;
padding: 0;
border: 0;
min-height: 4.4rem;
text-align: initial;
}
a.item,
button.item.item {
border-radius: 0;
margin: 0;
color: inherit;
text-decoration: none;
width: 100%;
line-height: normal;
justify-content: inherit;
box-shadow: none;
font-weight: normal;
}
.item-content {
margin: 0;
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.item-text-wrap,
.item-text-wrap .item-content {
white-space: normal;
}
.list .item {
border-radius: 0;
icon:first-child {
min-width: 26px;
text-align: center;
}
icon[small]:first-child {
min-width: 18px;
}
&.activated {
background-color: #d9d9d9;
}
transition: background 300ms ease-out;
&:active {
transition-duration: 0s;
}
}
.list .item.item {
.item-content + button,
.item-content + [button],
button + .item-content,
[button] + .item-content,
icon + icon,
icon + .item-content,
.item-content + icon,
.item-media + .item-content,
.item-content + .item-media,
.item-content + .item-content,
icon + .input,
.input + icon,
icon + .input-label,
.input-label + .input {
margin-left: 0;
}
}
.list a.item.item,
.list button.item.item {
margin-left: 0;
margin-right: 0;
padding: 0;
}
.item icon {
font-size: 2.4rem;
&[large] {
font-size: 3.2rem;
}
&[small] {
font-size: 1.8rem;
}
}
.list .item button.icon-only,
.item button.icon-only icon {
padding: 0;
}
.item > button.icon-left icon,
.item > button.icon-right icon {
font-size: 1.2em;
margin: 0;
padding: 0;
}
.item {
h2 {
margin: 0 0 2px;
font-size: 1.6rem;
font-weight: normal;
}
h3,
h4,
h5,
h6 {
line-height: normal;
margin: 0 0 3px 0;
font-size: 1.4rem;
font-weight: normal;
}
p {
line-height: normal;
color: #666;
font-size: 1.2rem;
margin: 0 0 2px;
}
h2:last-child,
h3:last-child,
h4:last-child,
h5:last-child,
h6:last-child,
p:last-child {
margin-bottom: 0;
}
}
.vertical-align-top,
.item.item-input {
align-items: flex-start;
}
.item a {
text-decoration: none;
}
.item.item.item.no-border-bottom:after {
border: none;
}
.item.item.item.no-border-bottom + .item::before {
border: none;
}
.item.item.item.no-border-bottom + .item {
margin-top: -13px;
}
.item .item-media {
line-height: 1;
img {
display: block;
}
}
/*
.item-group-title {
display: block;
padding: $item-padding;
padding-top: ceil($item-padding / 2);
padding-bottom: ceil($item-padding / 2);
min-height: 30px;
background-color: $item-divider-bg;
color: $item-divider-color;
font-weight: 500;
width: 100%;
z-index: 100;
&.sticky {
position: -webkit-sticky;
top: 0;
}
}
ion-primary-swipe-buttons,
.item-content {
transition: transform 0.3s;
}
ion-primary-swipe-buttons {
position: absolute;
top: 0;
left: 0;
bottom: 0;
z-index: 100;
transform: translate3d(-100%,0,0);
&:not(.open):not(.changing) {
display: none;
}
&.open {
transform: translate3d(100%, 0, 0);
}
}
// Some testing things
.item-media-placeholder {
width: 40px;
height: 40px;
border-radius: 50%;
background: #aaa;
margin-right: 16px;
}
.item-label h3 {
margin: 0;
font-size: 16px;
margin: 0 0 6px;
line-height: .75em;
color: #222;
font-weight: normal;
}
.item-label h4 {
margin: 10px 0 0px;
font-size: 14px;
line-height: 14px;
color: #858585;
}
*/