This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(layout): 'flex' change per recommended workarounds #6205
Closed
Closed
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
33dd0a1
fix(layout): 'flex' change per recommended workarounds
ThomasBurleson 800dd43
fix(layout): 'flex' change per recommended workarounds
ThomasBurleson 17c3466
fix(layout): 'flex' change per recommended workarounds
ThomasBurleson 3fd83bd
fix(layout): 'flex' change per recommended workarounds
ThomasBurleson bb0fd20
fix(layout): 'flex' change per recommended workarounds
ThomasBurleson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ angular.module('dialogDemo1', ['ngMaterial']) | |
|
||
.controller('AppCtrl', function($scope, $mdDialog, $mdMedia) { | ||
$scope.status = ' '; | ||
$scope.customFullscreen = $mdMedia('sm'); | ||
$scope.customFullscreen = $mdMedia('xs') || $mdMedia('sm'); | ||
|
||
$scope.showAlert = function(ev) { | ||
// Appending dialog to document.body to cover sidenav in docs app | ||
|
@@ -38,13 +38,15 @@ angular.module('dialogDemo1', ['ngMaterial']) | |
}; | ||
|
||
$scope.showAdvanced = function(ev) { | ||
var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && $scope.customFullscreen; | ||
|
||
$mdDialog.show({ | ||
controller: DialogController, | ||
templateUrl: 'dialog1.tmpl.html', | ||
parent: angular.element(document.body), | ||
targetEvent: ev, | ||
clickOutsideToClose:true, | ||
fullscreen: $mdMedia('sm') && $scope.customFullscreen | ||
fullscreen: useFullScreen | ||
}) | ||
.then(function(answer) { | ||
$scope.status = 'You said the information was "' + answer + '".'; | ||
|
@@ -55,9 +57,9 @@ angular.module('dialogDemo1', ['ngMaterial']) | |
|
||
|
||
$scope.$watch(function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This block needs a comment as to what it's doing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. existing code. |
||
return $mdMedia('sm'); | ||
}, function(sm) { | ||
$scope.customFullscreen = (sm === true); | ||
return $mdMedia('xs') || $mdMedia('sm'); | ||
}, function(wantsFullScreen) { | ||
$scope.customFullscreen = (wantsFullScreen === true); | ||
}); | ||
|
||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,8 +112,8 @@ | |
display: -ms-flexbox; | ||
display: flex; | ||
} | ||
.layout#{$name}-column { flex-direction: column; } | ||
.layout#{$name}-row { flex-direction: row; } | ||
.layout#{$name}-column { flex-direction: column; flex-shrink: 0; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This won't change any existing behavior? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does not appear to change anything. But I also can not validate its value. I will redact this for now. |
||
.layout#{$name}-row { flex-direction: row; } | ||
} | ||
|
||
@mixin flex-properties-for-name($name: null) { | ||
|
@@ -125,12 +125,13 @@ | |
$name : ''; | ||
} | ||
|
||
.#{$flexName} { flex: 1; box-sizing: border-box; } // === flex: 1 1 0%; | ||
.#{$flexName} { flex: 1 1 0%; box-sizing: border-box; } // === flex: 1 1 0%; | ||
.#{$flexName}-grow { flex: 1 1 100%; box-sizing: border-box; } | ||
.#{$flexName}-initial { flex: 0 1 auto; box-sizing: border-box; } | ||
.#{$flexName}-auto { flex: 1 1 auto; box-sizing: border-box; } | ||
.#{$flexName}-none { flex: 0 0 auto; box-sizing: border-box; } | ||
.#{$flexName}-noshrink { flex: 1 0 auto; box-sizing: border-box; } | ||
.#{$flexName}-nogrow { flex: 0 1 auto; box-sizing: border-box; } | ||
|
||
// (1-20) * 5 = 0-100% | ||
@for $i from 0 through 20 { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You got an extra tab in here or something.