-
Notifications
You must be signed in to change notification settings - Fork 160
feat(chips-area): add separate theme #17205
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
Open
adrianptrv
wants to merge
2
commits into
simeonoff/scoped-styles
Choose a base branch
from
apetrov/chip-area-separate-theme
base: simeonoff/scoped-styles
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+42
−31
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
projects/igniteui-angular/chips/src/chips/chips-area/chips-area.component.scss
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 |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| @use 'themes/base'; | ||
| @use 'themes/shared'; |
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
2 changes: 1 addition & 1 deletion
2
...ngular/chips/src/chips/chips-area.spec.ts → ...s/src/chips/chips-area/chips-area.spec.ts
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
15 changes: 15 additions & 0 deletions
15
projects/igniteui-angular/chips/src/chips/chips-area/themes/_base.scss
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 |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| @use 'styles/themes/standalone' as *; | ||
|
|
||
| @include layer(base) { | ||
| @include b(igx-chip-area) { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: flex-start; | ||
| flex-wrap: wrap; | ||
| width: 100%; | ||
|
|
||
| &:empty { | ||
| display: none; | ||
| } | ||
| } | ||
| } | ||
1 change: 1 addition & 0 deletions
1
projects/igniteui-angular/chips/src/chips/chips-area/themes/shared/_index.scss
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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @forward 'indigo'; |
7 changes: 7 additions & 0 deletions
7
projects/igniteui-angular/chips/src/chips/chips-area/themes/shared/_indigo.scss
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 |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| @use 'igniteui-theming/sass/typography' as *; | ||
| @use 'styles/themes/standalone' as *; | ||
|
|
||
| @include themed-block(igx-chip-area, indigo) { | ||
| padding: rem(4px); | ||
| gap: rem(8px) | ||
| } |
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 |
|---|---|---|
|
|
@@ -175,8 +175,3 @@ $_theme: $indigo; | |
| } | ||
| } | ||
| } | ||
|
|
||
| @include themed-block(igx-chip-area, indigo) { | ||
| padding: rem(4px); | ||
| gap: rem(8px) | ||
| } | ||
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 |
|---|---|---|
|
|
@@ -5,3 +5,8 @@ | |
| height: 100%; | ||
| align-items: start; | ||
| } | ||
|
|
||
| button { | ||
| margin-inline-end: 0.5rem; | ||
| margin-block-end: 0.5rem; | ||
| } | ||
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.
Not sure why we need
empty; the area is never empty, even when no chips are present. Can you test to see what happens if you remove it?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.
In the Grid context, the empty state is never reached because the drop-area element remains inside the chips-area even when no chips are added. However, when the chips-area is used independently outside of the grid, the
emptystate is applied whenever no chips are present. If we remove the 'empty' selector; on theemptystate, the chips-area element will still be displayed, but with 0px height: