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

feat(rtl): add rtl margin, padding, position and border-radius #11342

Merged
merged 58 commits into from
May 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
cb5ac7c
refactor(item): replaced item-left with item-start
AmitMY Apr 7, 2017
4509c1f
style(item): fix spacing
AmitMY Apr 8, 2017
2172d11
fix(item): add backwards support for left/right in ng-content
AmitMY Apr 24, 2017
22d24a0
fix(item): deprecated old variables, not breaking change
AmitMY Apr 24, 2017
e1da67d
Merge remote-tracking branch 'origin/breaking-item' into breaking-item
AmitMY Apr 24, 2017
d103932
Merge branch 'master' into breaking-item
AmitMY Apr 24, 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
bdafbf8
fix(scss): fix variable name
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
0d4e5c1
fix(item): old attributes deprecated support
AmitMY Apr 27, 2017
df3f74e
revert(changelog): not intended to be changed
AmitMY Apr 27, 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
02b6df9
Merge branch 'master' into breaking-item
AmitMY May 5, 2017
7dcdac6
Merge branch 'master' into start-end
AmitMY May 5, 2017
55ac2c5
Merge branch 'breaking-item' into start-end
AmitMY May 5, 2017
94cf77e
Merge branch 'breaking-item' into start-end
AmitMY May 5, 2017
2857678
Merge branch 'master' into start-end
AmitMY May 5, 2017
176b454
fix(scss): fix for deprecated usages
AmitMY May 8, 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
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
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
71 changes: 57 additions & 14 deletions src/components/action-sheet/action-sheet.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,20 @@ $action-sheet-md-title-color: #757575 !default;
/// @prop - Font size of the action sheet title
$action-sheet-md-title-font-size: 1.6rem !default;

/// @prop - Padding of the action sheet title
$action-sheet-md-title-padding: 11px 16px 17px !default;
// deprecated
$action-sheet-md-title-padding: null !default;

/// @prop - Padding top of the action sheet title
$action-sheet-md-title-padding-top: 11px !default;

/// @prop - Padding end of the action sheet title
$action-sheet-md-title-padding-end: 16px !default;

/// @prop - Padding bottom of the action sheet title
$action-sheet-md-title-padding-bottom: 17px !default;

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

/// @prop - Minimum height of the action sheet button
$action-sheet-md-button-min-height: 4.8rem !default;
Expand All @@ -30,8 +42,20 @@ $action-sheet-md-button-text-color: #222 !default;
/// @prop - Font size of the action sheet button
$action-sheet-md-button-font-size: 1.6rem !default;

/// @prop - Padding of the action sheet button
$action-sheet-md-button-padding: 0 16px !default;
// deprecated
$action-sheet-md-button-padding: null !default;

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

/// @prop - Padding end of the action sheet button
$action-sheet-md-button-padding-end: 16px !default;

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

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

/// @prop - Background color of the action sheet button
$action-sheet-md-button-background: transparent !default;
Expand All @@ -51,22 +75,36 @@ $action-sheet-md-icon-text-align: center !default;
/// @prop - Vertical align of the icon in the action sheet button
$action-sheet-md-icon-vertical-align: middle !default;

/// @prop - Margin of the icon in the action sheet button
$action-sheet-md-icon-margin: 0 32px 0 0 !default;
// deprecated
$action-sheet-md-icon-margin: null !default;

/// @prop - Margin top of the icon in the action sheet button
$action-sheet-md-icon-margin-top: 0 !default;

/// @prop - Margin end of the icon in the action sheet button
$action-sheet-md-icon-margin-end: 32px !default;

/// @prop - Margin bottom of the icon in the action sheet button
$action-sheet-md-icon-margin-bottom: 0 !default;

/// @prop - Margin start of the icon in the action sheet button
$action-sheet-md-icon-margin-start: 0 !default;

.action-sheet-md .action-sheet-container {
padding: .8rem 0;
@include padding(.8rem, 0);

background: $action-sheet-md-background;
}

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

padding: $action-sheet-md-title-padding;

font-size: $action-sheet-md-title-font-size;
color: $action-sheet-md-title-color;

@include deprecated-variable(padding, $action-sheet-md-title-padding) {
@include padding($action-sheet-md-title-padding-top, $action-sheet-md-title-padding-end, $action-sheet-md-title-padding-bottom, $action-sheet-md-title-padding-start);
}
}

.action-sheet-md .action-sheet-button {
Expand All @@ -75,29 +113,34 @@ $action-sheet-md-icon-margin: 0 32px 0 0 !default;
position: relative;
overflow: hidden;

padding: $action-sheet-md-button-padding;

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

font-size: $action-sheet-md-button-font-size;
color: $action-sheet-md-button-text-color;
background: $action-sheet-md-button-background;


@include deprecated-variable(padding, $action-sheet-md-button-padding) {
@include padding($action-sheet-md-button-padding-top, $action-sheet-md-button-padding-end, $action-sheet-md-button-padding-bottom, $action-sheet-md-button-padding-start);
}
}

.action-sheet-md .action-sheet-button.activated {
background: $action-sheet-md-button-background-activated;
}

.action-sheet-md .action-sheet-icon {
@include padding(0);
@include text-align($action-sheet-md-icon-text-align);

margin: $action-sheet-md-icon-margin;
padding: 0;

width: $action-sheet-md-icon-width;

font-size: $action-sheet-md-icon-font-size;
vertical-align: $action-sheet-md-icon-vertical-align;

@include deprecated-variable(margin, $action-sheet-md-icon-margin) {
@include margin($action-sheet-md-icon-margin-top, $action-sheet-md-icon-margin-end, $action-sheet-md-icon-margin-bottom, $action-sheet-md-icon-margin-start);
}
}

.action-sheet-md .action-sheet-group {
Expand Down
12 changes: 5 additions & 7 deletions src/components/action-sheet/action-sheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ $action-sheet-max-width: 500px !default;


ion-action-sheet {
@include position(0, null, null, 0);

position: absolute;
top: 0;
left: 0;
z-index: $z-index-overlay;
display: block;

Expand All @@ -22,15 +22,13 @@ ion-action-sheet {
}

.action-sheet-wrapper {
@include position(null, 0, 0, 0);
@include margin(auto);

position: absolute;
right: 0;
bottom: 0;
left: 0;
z-index: $z-index-overlay-wrapper;
display: block;

margin: auto;

width: $action-sheet-width;
max-width: $action-sheet-max-width;

Expand Down
Loading