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(rtl): add icon-start and icon-end notations #11217

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
516e68d
fix(rtl): add icon-start and icon-end notations
AmitMY Apr 13, 2017
3536066
fix(icon): deprecate icon-left and icon-right
AmitMY Apr 13, 2017
0c04bbc
fix(): replace all icon-left with icon-start
AmitMY Apr 13, 2017
58e9fcf
style(css): fix css value alignment
AmitMY Apr 21, 2017
9211c41
style(css): fix css value alignment
AmitMY Apr 21, 2017
4c8189a
fix(sass): create deprecated variables for compatibility
AmitMY Apr 21, 2017
13294ed
feat(rtl): padding mixin
AmitMY Apr 24, 2017
5ab8d60
feat(rtl): change all padding variables to start/end
AmitMY Apr 24, 2017
2b3897a
feat(rtl): replace all padding-side with start/end
AmitMY Apr 24, 2017
abdff51
Merge remote-tracking branch 'origin/start-end' into start-end
AmitMY Apr 24, 2017
6629092
revert(functions): remove mixins
AmitMY Apr 24, 2017
ce2d9f1
feat(scss): add padding-horizontal and rtl functions (thanks brandy)
AmitMY Apr 24, 2017
a6c1feb
feat(padding): use padding horizontal mixin everywhere
AmitMY Apr 24, 2017
1a4e0d4
feat(padding): use padding horizontal mixin everywhere
AmitMY Apr 24, 2017
a332df7
fix(lint): change properties order. tests passing
AmitMY Apr 24, 2017
bfe80bb
fix(sass-functions): reorder functions to avoid warning
AmitMY Apr 24, 2017
762fdb0
perf(rtl): add check if need rtl selector
AmitMY Apr 25, 2017
8f228e8
feat(scss): add full padding function
AmitMY Apr 25, 2017
4f81dd2
feat(scss): add border-radius mixin
AmitMY Apr 25, 2017
f2077f4
fix(rtl): change border-radius to use mixin
AmitMY Apr 25, 2017
d27b7b0
perf(scss): only override if has something to override
AmitMY Apr 25, 2017
8ebd500
feat(scss): add margin scss variables for sides
AmitMY Apr 25, 2017
40624db
feat(scss): add margin mixin
AmitMY Apr 25, 2017
bc93198
fix(scss): fix wrong support for 2/3 args
AmitMY Apr 25, 2017
c79db3b
feat(rtl): spread margins/paddings
AmitMY Apr 25, 2017
788728a
feat(rtl): spread margins/paddings
AmitMY Apr 25, 2017
ffce076
feat(position): add rtl support for absolute
AmitMY Apr 25, 2017
2c89379
fix(rtl): add missing calls
AmitMY Apr 26, 2017
e428c61
Merge branch 'master' into start-end
AmitMY Apr 27, 2017
cfecb3e
Merge branch 'master' into start-end
AmitMY May 1, 2017
2b409e1
fix(sass-functions): and not &&
AmitMY May 2, 2017
00152e9
fix(padding): merge + missing padding
AmitMY May 2, 2017
93f78c2
fix(padding): merge + missing padding
AmitMY May 2, 2017
6f84b7b
style(): remove newline
AmitMY May 2, 2017
b8721c8
refactor(mixins): move mixins to mixins file
AmitMY May 2, 2017
cf99437
style(): fix alignment
AmitMY May 2, 2017
d1ac9a0
fix(item): right padding should not be set
AmitMY May 2, 2017
3cbc8d6
fix(): incorrect defaults
AmitMY May 2, 2017
3577190
feat(scss-lint): disable some side variables
AmitMY May 4, 2017
7e38881
fix(scss): lint passes
AmitMY May 4, 2017
1a863ef
feat(lint): disabled text-align
AmitMY May 4, 2017
7307706
fix(): correct variable name
AmitMY May 4, 2017
b6ad052
fix(fab): missed a comma
AmitMY May 4, 2017
4376436
Merge branch 'master' into start-end
AmitMY May 4, 2017
d1ce2d6
fix(rtl): rtl method incorrect for multiple selectors
AmitMY May 5, 2017
8d045b7
fix(rtl): toolbar bad merge
AmitMY May 5, 2017
c25eca6
fix(rtl): icon-only is in px not em
AmitMY May 5, 2017
3757a44
fix(rtl): toggle padding
AmitMY May 5, 2017
5ad8328
feat(rtl): correct notation for rtl custom
AmitMY May 5, 2017
becf2b9
fix(doc): correct alignment
AmitMY May 5, 2017
59eb644
Merge branch 'start-end' into icon-x
AmitMY May 5, 2017
c488c14
Merge branch 'start-end' into icon-x
AmitMY May 5, 2017
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
37 changes: 21 additions & 16 deletions .scss-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,10 @@ linters:

- position
- top
- right
- bottom
- left
- z-index
- display
- overflow
- float
- clear
-
- flex
Expand All @@ -59,16 +56,10 @@ linters:
- justify-content
- order
-
- margin
- margin-top
- margin-right
- margin-bottom
- margin-left
- padding
- padding-top
- padding-right
- padding-bottom
- padding-left
-
- width
- min-width
Expand Down Expand Up @@ -104,12 +95,6 @@ linters:
- border-bottom-style
- border-left-style

- border-radius
- border-top-left-radius
- border-top-right-radius
- border-bottom-left-radius
- border-bottom-right-radius

- border-color
- border-top-color
- border-right-color
Expand All @@ -135,7 +120,6 @@ linters:
- letter-spacing
- line-height
- list-style
- text-align
- text-decoration
- text-indent
- text-overflow
Expand Down Expand Up @@ -207,3 +191,24 @@ linters:
PropertySpelling:
extra_properties:
- contain
disabled_properties:
- right
- left

- float

- padding
- padding-left
- padding-right

- margin
- margin-left
- margin-right

- border-radius
- border-top-left-radius
- border-top-right-radius
- border-bottom-right-radius
- border-bottom-left-radius

- text-align
4 changes: 2 additions & 2 deletions demos/src/button/pages/page-one/page-one.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ <h4>Outlines</h4>

<h4>Icons</h4>

<button ion-button icon-left color="dark">
<button ion-button icon-start color="dark">
<ion-icon name="star"></ion-icon>
Left Icon
</button>

<button ion-button icon-right color="dark">
<button ion-button icon-end color="dark">
Right Icon
<ion-icon name="star"></ion-icon>
</button>
Expand Down
2 changes: 1 addition & 1 deletion demos/src/item-sliding/pages/page-one/page-one.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h2>{{login.name}}</h2>
<ion-icon name="trash"></ion-icon>
</button>
</ion-item-options>
<ion-item-options (ionSwipe)="download(item)" icon-left>
<ion-item-options (ionSwipe)="download(item)" icon-start>
<button ion-button color="dark" (click)="more(item)">
<ion-icon name="volume-off"></ion-icon>
Mute
Expand Down
2 changes: 1 addition & 1 deletion demos/src/loading/pages/page-one/page-one.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

<ion-toolbar>
<ion-buttons end>
<button ion-button icon-right (click)="goToPage2()">
<button ion-button icon-end (click)="goToPage2()">
Show Loading and Navigate
<ion-icon name="arrow-forward"></ion-icon>
</button>
Expand Down
4 changes: 2 additions & 2 deletions demos/src/navbar/pages/page-one/page-one.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</ion-buttons>
<ion-title>Solid</ion-title>
<ion-buttons end>
<button ion-button icon-right solid color="secondary">
<button ion-button icon-end solid color="secondary">
Help
<ion-icon name="help-circle"></ion-icon>
</button>
Expand All @@ -69,7 +69,7 @@
</button>
</ion-buttons>
<ion-buttons end>
<button ion-button icon-right outline color="secondary">
<button ion-button icon-end outline color="secondary">
Help
<ion-icon name="help-circle"></ion-icon>
</button>
Expand Down
4 changes: 2 additions & 2 deletions demos/src/tabs/pages/page-one/page-one.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@


<!-- Icons right of text -->
<ion-tabs tabs-only tabsLayout="icon-right" selectedIndex="0" color="light">
<ion-tabs tabs-only tabsLayout="icon-end" selectedIndex="0" color="light">
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root"></ion-tab>
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root"></ion-tab>
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root" tabBadge="4" tabBadgeStyle="secondary"></ion-tab>
</ion-tabs>


<!-- Icons left of text -->
<ion-tabs tabs-only tabsLayout="icon-left" color="dark">
<ion-tabs tabs-only tabsLayout="icon-start" color="dark">
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root" tabBadge="1" tabBadgeStyle="danger"></ion-tab>
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root"></ion-tab>
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root"></ion-tab>
Expand Down
4 changes: 2 additions & 2 deletions demos/src/title/pages/page-one/page-one.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</ion-buttons>
<ion-title>Solid</ion-title>
<ion-buttons end>
<button ion-button icon-right solid color="secondary">
<button ion-button icon-end solid color="secondary">
Help
<ion-icon name="help-circle"></ion-icon>
</button>
Expand All @@ -69,7 +69,7 @@
</button>
</ion-buttons>
<ion-buttons end>
<button ion-button icon-right outline color="secondary">
<button ion-button icon-end outline color="secondary">
Help
<ion-icon name="help-circle"></ion-icon>
</button>
Expand Down
4 changes: 2 additions & 2 deletions demos/src/toolbar/pages/page-one/page-one.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</ion-buttons>
<ion-title>Solid</ion-title>
<ion-buttons end>
<button ion-button icon-right solid color="secondary">
<button ion-button icon-end solid color="secondary">
Help
<ion-icon name="help-circle"></ion-icon>
</button>
Expand All @@ -69,7 +69,7 @@
</button>
</ion-buttons>
<ion-buttons end>
<button ion-button icon-right outline color="secondary">
<button ion-button icon-end outline color="secondary">
Help
<ion-icon name="help-circle"></ion-icon>
</button>
Expand Down
3 changes: 2 additions & 1 deletion scripts/gulp/tasks/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ task('lint.sass', function() {
return src([
'src/**/*.scss',
'!src/components/*/test/**/*',
'!src/util/test/*'
'!src/util/test/*',
'!src/themes/normalize.scss',
])
.pipe(scsslint())
.pipe(scsslint.failReporter());
Expand Down
4 changes: 2 additions & 2 deletions src/components/action-sheet/action-sheet-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import { ViewController } from '../../navigation/view-controller';
'<div class="action-sheet-group">' +
'<div class="action-sheet-title" id="{{hdrId}}" *ngIf="d.title">{{d.title}}</div>' +
'<div class="action-sheet-sub-title" id="{{descId}}" *ngIf="d.subTitle">{{d.subTitle}}</div>' +
'<button ion-button="action-sheet-button" (click)="click(b)" *ngFor="let b of d.buttons" class="disable-hover" [attr.icon-left]="b.icon ? \'\' : null" [ngClass]="b.cssClass">' +
'<button ion-button="action-sheet-button" (click)="click(b)" *ngFor="let b of d.buttons" class="disable-hover" [attr.icon-start]="b.icon ? \'\' : null" [ngClass]="b.cssClass">' +
'<ion-icon [name]="b.icon" *ngIf="b.icon" class="action-sheet-icon"></ion-icon>' +
'{{b.text}}' +
'</button>' +
'</div>' +
'<div class="action-sheet-group" *ngIf="cancelButton">' +
'<button ion-button="action-sheet-button" (click)="click(cancelButton)" class="action-sheet-cancel disable-hover" [attr.icon-left]="cancelButton.icon ? \'\' : null" [ngClass]="cancelButton.cssClass">' +
'<button ion-button="action-sheet-button" (click)="click(cancelButton)" class="action-sheet-cancel disable-hover" [attr.icon-start]="cancelButton.icon ? \'\' : null" [ngClass]="cancelButton.cssClass">' +
'<ion-icon [name]="cancelButton.icon" *ngIf="cancelButton.icon" class="action-sheet-icon"></ion-icon>' +
'{{cancelButton.text}}' +
'</button>' +
Expand Down
32 changes: 23 additions & 9 deletions src/components/action-sheet/action-sheet.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,20 @@
/// @prop - Text align of the action sheet
$action-sheet-ios-text-align: center !default;

/// @prop - Padding of the action sheet
$action-sheet-ios-padding: 0 10px !default;
// deprecated
$action-sheet-ios-padding: null !default;

/// @prop - Padding top of the action sheet
$action-sheet-ios-padding-top: 0 !default;

/// @prop - Padding end of the action sheet
$action-sheet-ios-padding-end: 10px !default;

/// @prop - Padding bottom of the action sheet
$action-sheet-ios-padding-bottom: $action-sheet-ios-padding-top !default;

/// @prop - Padding start of the action sheet
$action-sheet-ios-padding-start: $action-sheet-ios-padding-end !default;

/// @prop - Bottom margin of the action sheet button group
$action-sheet-ios-group-margin-bottom: 10px !default;
Expand Down Expand Up @@ -78,15 +90,18 @@ $action-sheet-ios-button-cancel-font-weight: 600 !default;
}

.action-sheet-ios .action-sheet-container {
padding: $action-sheet-ios-padding;
@include deprecated-variable(padding, $action-sheet-ios-padding) {
@include padding($action-sheet-ios-padding-top, $action-sheet-ios-padding-end, $action-sheet-ios-padding-bottom, $action-sheet-ios-padding-start);
}
}

.action-sheet-ios .action-sheet-group {
@include border-radius($action-sheet-ios-border-radius);

overflow: hidden;

margin-bottom: $action-sheet-ios-group-margin-bottom - 2;

border-radius: $action-sheet-ios-border-radius;
background: $action-sheet-ios-background;
}

Expand All @@ -95,20 +110,19 @@ $action-sheet-ios-button-cancel-font-weight: 600 !default;
}

.action-sheet-ios .action-sheet-title {
@include padding($action-sheet-ios-title-padding);
@include text-align($action-sheet-ios-text-align);

padding: $action-sheet-ios-title-padding;
@include border-radius($action-sheet-ios-title-border-radius);

border-bottom: $action-sheet-ios-button-border-width $action-sheet-ios-button-border-style $action-sheet-ios-border-color;
border-radius: $action-sheet-ios-title-border-radius;
font-size: $action-sheet-ios-title-font-size;
font-weight: $action-sheet-ios-title-font-weight;
color: $action-sheet-ios-title-color;
}

.action-sheet-ios .action-sheet-button {
margin: 0;
padding: $action-sheet-ios-button-padding;
@include margin(0);
@include padding($action-sheet-ios-button-padding);

min-height: $action-sheet-ios-button-min-height;

Expand Down
Loading