From c7e3defca51f03368be84e7f86d71e7ec2fb374c Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Mon, 7 Apr 2014 15:33:32 -0500 Subject: [PATCH] refactor(item): Create .icon-accessory and remove auto nav icons, closes #1061 BREAKING CHANGE: The developer should be stating exactly how an icon should show, but previously the right nav arrow icon violates this by automatically showing a right arrow when an item was an anchor or button. Instead of using the `:after` item selector, which was always applied by default, it uses the same markup as `item-icon-right`, which is easier to understand, customizable and not a hard coded default. This change removes the `:after` nav icon styling, and creates a new class, `icon-accessory`, based off of similar CSS. The change makes a nav arrow highly customizable, allows RTL developers to easily control the arrow direction, and the accessory class is something that's reusable. An example of right side arrow using `ion-chevron-right` as the icon: Check mail --- scss/_items.scss | 65 ++++++++------------------------------------ scss/_variables.scss | 3 ++ test/html/lists.html | 38 +++++++++++++++++--------- 3 files changed, 40 insertions(+), 66 deletions(-) diff --git a/scss/_items.scss b/scss/_items.scss index e7aef6041c9..8c7544937ea 100644 --- a/scss/_items.scss +++ b/scss/_items.scss @@ -300,6 +300,18 @@ a.item-content { left: auto; } +.item-icon-left .icon-accessory, +.item-icon-right .icon-accessory { + color: $item-icon-accessory-color; + font-size: $item-icon-accessory-font-size; +} +.item-icon-left .icon-accessory { + left: round($item-padding / 5); +} +.item-icon-right .icon-accessory { + right: round($item-padding / 5); +} + /** * Item Button @@ -375,59 +387,6 @@ button.item.item-button-right { } -/** - * Auto Right Arrow Icon - * -------------------------------------------------- - * By default, if an .item is created out of an or @@ -383,7 +395,7 @@

List with card

Settings - +
@@ -418,7 +430,7 @@

List with card

Default has no wrap! This is a list item with really really really really really really really really really long long long long long long text text text texxxxxttt text testy text!!! - + @@ -426,7 +438,7 @@

List with card

Assigned "item-text-wrap". This is a list item with really really really really really really really really really long long long long long long text text text texxxxxttt text testy text!!! - +
@@ -435,7 +447,7 @@

List with card

Default no wrap and has item-content! This is a list item with really really really really really really really really really long long long long long long text text text texxxxxttt text testy text!!! - +
@@ -448,7 +460,7 @@

List with card

Assigned "item-text-wrap" and has item-content. This is a list item with really really really really really really really really really long long long long long long text text text texxxxxttt text testy text!!! - +
@@ -465,7 +477,7 @@

List with card

Thumbnails .item-thumbnail