From 007c881ad0188912cea1690577da9177698bcbee Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Thu, 12 Nov 2015 14:19:52 -0500 Subject: [PATCH] refactor(list): adding no-lines attribute on - if on an item it will only affect border bottom closes #493 --- ionic/components/list/modes/ios.scss | 15 ++++++------ ionic/components/list/modes/md.scss | 34 ++++++++++++---------------- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/ionic/components/list/modes/ios.scss b/ionic/components/list/modes/ios.scss index 7d8d1542f5..076759f1a1 100644 --- a/ionic/components/list/modes/ios.scss +++ b/ionic/components/list/modes/ios.scss @@ -82,14 +82,13 @@ $list-ios-header-color: #333 !default; border-bottom: 1px solid $item-ios-border-color; } - // If the item has the no-lines attribute remove the border from: - // the item itself (for first or last-child items) - // the item-inner class (if it is not first or last) - // the next item's item-inner after the one with no-lines if there is one - // .item[no-lines], - // .item[no-lines] .item-inner, { - // border-width: 0; - // } + // If the item has the no-lines attribute remove the bottom border from: + // the item itself (for last-child items) + // the item-inner class (if it is not last) + .item[no-lines], + .item[no-lines] .item-inner, { + border-width: 0; + } [item-left] { margin: ($item-ios-padding-top / 2) $item-ios-padding-right ($item-ios-padding-bottom / 2) 0; diff --git a/ionic/components/list/modes/md.scss b/ionic/components/list/modes/md.scss index 63c8d950c3..b6fa8b8198 100644 --- a/ionic/components/list/modes/md.scss +++ b/ionic/components/list/modes/md.scss @@ -40,13 +40,13 @@ $list-md-header-color: #858585 !default; } } - // .item[no-lines], - // .item[no-lines] + .item { - // border-width: 0; - // .item-inner { - // border-width: 0; - // } - // } + // If the item has the no-lines attribute remove the bottom border from: + // the item itself (for last-child items) + // the item-inner class (if it is not last) + .item[no-lines], + .item[no-lines] .item-inner { + border-width: 0; + } ion-header, ion-item-group-title { @@ -248,15 +248,11 @@ $list-md-header-color: #858585 !default; /* NO LINES LIST */ /*****************/ -// .list[no-lines] { -// .item { -// border-width: 0; -// } -// -// ion-header + .item, -// ion-header + script + .item, -// ion-item-group-title + .item, -// ion-item-group-title + script + .item { -// border-width: 1px !important; -// } -// } +.list[no-lines] { + ion-header, + ion-item-group-title, + .item, + .item .item-inner { + border-width: 0; + } +}