This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Repository navigation
refactor(input): refactors styles to use display: inline-block
#4970
Closed
Closed
Changes from all commits
Commits
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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -6,16 +6,23 @@ $checkbox-border-width: 2px !default; | |
| $checkbox-text-margin: 10px !default; | ||
| $checkbox-top-left: 12px !default; | ||
|
|
||
| .md-inline-form { | ||
| md-checkbox { | ||
| margin: 19px 0 18px; | ||
|
Contributor
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. These same values are used in switch, checkbox, and radio-group. Could they be scss variables? |
||
| } | ||
| } | ||
|
|
||
| md-checkbox { | ||
| box-sizing: border-box; | ||
| display: block; | ||
| display: inline-block; | ||
| margin: $checkbox-margin; | ||
| white-space: nowrap; | ||
| cursor: pointer; | ||
| outline: none; | ||
| user-select: none; | ||
| @include rtl(padding-left, $checkbox-width, 0); | ||
| @include rtl(padding-right, 0, $checkbox-width); | ||
| padding: 2px; | ||
| @include rtl(padding-left, $checkbox-width, 2px); | ||
| @include rtl(padding-right, 2px, $checkbox-width); | ||
| position: relative; | ||
| line-height: $checkbox-width + $checkbox-margin; | ||
| min-width: $checkbox-width; | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,13 +1,2 @@ | ||
| md-datepicker { | ||
| margin-top:18px; | ||
| } | ||
|
|
||
| .md-datepicker-button { | ||
| height: 36px; | ||
| width: 36px; | ||
| line-height: 36px; | ||
| } | ||
|
|
||
| .md-datepicker-input-container { | ||
| margin-left: 2px; | ||
| } | ||
| .md-datepicker-button { width: 36px; } | ||
| .md-datepicker-input-container { margin-left: 2px; } |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| .inputErrorsApp { | ||
| min-height:48px; | ||
| } | ||
| .inputErrorsApp { min-height:48px; } |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,18 +1,5 @@ | ||
| .inputIconDemo { | ||
| min-height:48px; | ||
| } | ||
|
|
||
|
|
||
| md-input-container:not(.md-input-invalid) > md-icon.email { | ||
| color : green; | ||
| } | ||
| md-input-container:not(.md-input-invalid) > md-icon.name { | ||
| color : dodgerblue; | ||
| } | ||
|
|
||
| .inputIconDemo { min-height: 48px; } | ||
| md-input-container:not(.md-input-invalid) > md-icon.email { color: green; } | ||
| md-input-container:not(.md-input-invalid) > md-icon.name { color: dodgerblue; } | ||
| md-input-container.md-input-invalid > md-icon.email, | ||
| md-input-container.md-input-invalid > md-icon.name, | ||
| { | ||
| color : red; | ||
| } | ||
|
|
||
| md-input-container.md-input-invalid > md-icon.name { color: red; } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,25 +1,25 @@ | ||
| <div class="inset" ng-controller="SwitchDemoCtrl" ng-cloak> | ||
| <md-switch ng-model="data.cb1" aria-label="Switch 1"> | ||
| <md-switch ng-model="data.cb1" aria-label="Switch 1" class="md-block"> | ||
| Switch 1: {{ data.cb1 }} | ||
| </md-switch> | ||
|
|
||
| <md-switch ng-model="data.cb2" aria-label="Switch 2" ng-true-value="'yup'" ng-false-value="'nope'" class="md-warn"> | ||
| <md-switch ng-model="data.cb2" aria-label="Switch 2" ng-true-value="'yup'" ng-false-value="'nope'" class="md-warn md-block"> | ||
| Switch 2 (md-warn): {{ data.cb2 }} | ||
| </md-switch> | ||
|
|
||
| <md-switch ng-disabled="true" aria-label="Disabled switch" ng-model="disabledModel"> | ||
| <md-switch ng-disabled="true" aria-label="Disabled switch" ng-model="disabledModel" class="md-block"> | ||
| Switch (Disabled) | ||
| </md-switch> | ||
|
|
||
| <md-switch ng-disabled="true" aria-label="Disabled active switch" ng-model="data.cb4"> | ||
| <md-switch ng-disabled="true" aria-label="Disabled active switch" ng-model="data.cb4" class="md-block"> | ||
| Switch (Disabled, Active) | ||
| </md-switch> | ||
|
|
||
| <md-switch class="md-primary" md-no-ink aria-label="Switch No Ink" ng-model="data.cb5"> | ||
| <md-switch class="md-primary md-block" md-no-ink aria-label="Switch No Ink" ng-model="data.cb5"> | ||
| Switch (md-primary): No Ink | ||
| </md-switch> | ||
|
|
||
| <md-switch ng-model="data.cb6" aria-label="Switch 6" ng-change="onChange(data.cb6)"> | ||
| <md-switch ng-model="data.cb6" aria-label="Switch 6" ng-change="onChange(data.cb6)" class="md-block"> | ||
| Switch 6 message: {{ message }} | ||
| </md-switch> | ||
| </div> |
Oops, something went wrong.
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.
For each of the newly added
.md-inline-formrules, can you add a brief description of the style changes that make the element sit in-line?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.
Should
.md-inline-formbe documented somewhere?