Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(item): flip forward icon when rtl #11247

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/components/item/item.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ $item-ios-detail-push-color: $list-ios-border-color !default;
/// @prop - Icon for the detail arrow
$item-ios-detail-push-svg: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M2,20l-2-2l8-8L0,2l2-2l10,10L2,20z' fill='#{$item-ios-detail-push-color}'/></svg>" !default;

/// @prop - Icon for the detail arrow in rtl
$item-ios-detail-push-svg-rtl: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M2,20l-2-2l8-8L0,2l2-2l10,10L2,20z' fill='#{$item-ios-detail-push-color}' transform='rotate(180 6 10)'/></svg>" !default;

/// @prop - Background for the divider
$item-ios-divider-background: #f7f7f7 !default;

Expand Down Expand Up @@ -203,13 +206,26 @@ $item-ios-sliding-content-background: $list-ios-background-color !default;
button.item-ios:not([detail-none]) .item-inner,
a.item-ios:not([detail-none]) .item-inner {
@include svg-background-image($item-ios-detail-push-svg);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the whitespaces?

padding-right: 32px;
padding-left: 0;

background-repeat: no-repeat;
background-position: right ($item-ios-padding-right - 2) center;
background-size: 14px 14px;
}
[dir="rtl"] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be an empty line after 216

.item-ios[detail-push] .item-inner,
button.item-ios:not([detail-none]) .item-inner,
a.item-ios:not([detail-none]) .item-inner {
@include svg-background-image($item-ios-detail-push-svg-rtl);

padding-right: 0;
padding-left: 32px;

background-position: left ($item-ios-padding-left - 2) center;
}
}
}


Expand Down
16 changes: 16 additions & 0 deletions src/components/item/item.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ $item-md-detail-push-color: $list-md-border-color !default;
/// @prop - Icon for the detail arrow
$item-md-detail-push-svg: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M2,20l-2-2l8-8L0,2l2-2l10,10L2,20z' fill='#{$item-md-detail-push-color}'/></svg>" !default;

/// @prop - Icon for the detail arrow in rtl
$item-md-detail-push-svg-rtl: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M2,20l-2-2l8-8L0,2l2-2l10,10L2,20z' fill='#{$item-md-detail-push-color}' transform='rotate(180 6 10)'/></svg>" !default;

/// @prop - Color for the divider
$item-md-divider-color: #858585 !default;

Expand Down Expand Up @@ -130,11 +133,24 @@ $item-md-sliding-content-background: $list-md-background-color !default;
@include svg-background-image($item-md-detail-push-svg);

padding-right: 32px;
padding-left: 0;

background-repeat: no-repeat;
background-position: right ($item-md-padding-right - 2) center;
background-size: 14px 14px;
}
[dir="rtl"] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty line after 141

.item-md[detail-push] .item-inner,
button.item-md:not([detail-none]) .item-inner,
a.item-md:not([detail-none]) .item-inner {
@include svg-background-image($item-md-detail-push-svg-rtl);

padding-right: 0;
padding-left: 32px;

background-position: left ($item-md-padding-left - 2) center
}
}
}


Expand Down
16 changes: 16 additions & 0 deletions src/components/item/item.wp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ $item-wp-detail-push-color: $input-wp-border-color !default;
/// @prop - Icon for the detail arrow
$item-wp-detail-push-svg: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M2,20l-2-2l8-8L0,2l2-2l10,10L2,20z' fill='#{$item-wp-detail-push-color}'/></svg>" !default;

/// @prop - Icon for the detail arrow in rtl
$item-wp-detail-push-svg-rtl: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M2,20l-2-2l8-8L0,2l2-2l10,10L2,20z' fill='#{$item-wp-detail-push-color}' transform='rotate(180 6 10)'/></svg>" !default;

/// @prop - Color for the divider
$item-wp-divider-color: $list-wp-text-color !default;

Expand Down Expand Up @@ -135,11 +138,24 @@ $item-wp-sliding-content-background: $list-wp-background-color !default;
@include svg-background-image($item-wp-detail-push-svg);

padding-right: 32px;
padding-left: 0;

background-repeat: no-repeat;
background-position: right ($item-wp-padding-right - 2) center;
background-size: 14px 14px;
}
[dir="rtl"] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty line after 146

.item-wp[detail-push] .item-inner,
button.item-wp:not([detail-none]) .item-inner,
a.item-wp:not([detail-none]) .item-inner {
@include svg-background-image($item-wp-detail-push-svg-rtl);

padding-right: 0;
padding-left: 32px;

background-position: left ($item-wp-padding-left -2) center;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after minus

}
}
}


Expand Down