-
Notifications
You must be signed in to change notification settings - Fork 160
feat(splitter): update splitter styles #16909
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
add746e
feat(splitter): update splitter styles
didimmova 2e3bd37
styles(splitter): use background transiton, not opacity
didimmova 4896899
Merge branch 'master' into didimmova/update-splitter
didimmova 21b32cf
Merge branch 'master' into didimmova/update-splitter
kacheshmarova 363e751
Merge branch 'master' into didimmova/update-splitter
desig9stein 6eb365c
Merge branch 'master' into didimmova/update-splitter
didimmova 6fba3da
style(splitter): update splitter opacity styles
didimmova 61178cd
feat(splitter): fix latest issues
didimmova 0e86417
chore(splitter): fix transitions
didimmova 3fd8c71
fix(splitter): expand non-collapsible splitterin indigo
didimmova f526fd4
Merge branch 'master' into didimmova/update-splitter
didimmova 3a9f074
fix(splitter): use base-font-size var and splitter-size var
didimmova 4e54bbc
Merge branch 'master' into didimmova/update-splitter
didimmova 04cefce
Merge branch 'master' into didimmova/update-splitter
didimmova b57299f
Update projects/igniteui-angular/core/src/core/styles/components/spli…
didimmova 1929604
Update projects/igniteui-angular/core/src/core/styles/components/spli…
didimmova af5abc6
Merge branch 'master' into didimmova/update-splitter
desig9stein 762eb1d
Merge branch 'master' into didimmova/update-splitter
simeonoff 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 |
|---|---|---|
|
|
@@ -15,14 +15,18 @@ | |
|
|
||
| $variant: map.get($theme, '_meta', 'theme'); | ||
|
|
||
| //splitter-size + borders | ||
| $splitter-size: unitless(map.get($theme, 'size')) + 2; | ||
| $base-font-size: 16; | ||
|
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. we have a global --ig-base-font-size, why not using it? |
||
|
|
||
| //splitter-size (convert rem to px) + padding | ||
| $splitter-size: unitless(map.get($theme, 'size')) * $base-font-size + 2; | ||
|
|
||
| //calculate the value for the slim(indigo) splitter | ||
| $slim-splitter: calc( 1 / $splitter-size); | ||
|
|
||
| %igx-splitter-base { | ||
| &[aria-orientation='horizontal'] { | ||
| padding-block: rem(1px); | ||
|
|
||
| [dir='rtl'] & { | ||
| flex-direction: row-reverse !important; | ||
| } | ||
|
|
@@ -126,11 +130,9 @@ | |
| flex-grow: 1; | ||
| justify-content: center; | ||
| align-items: center; | ||
| background: $splitter-color; | ||
| border: rem(1px) solid $splitter-color; | ||
| background: hsla(from $splitter-color h s l / 0.68); | ||
| z-index: 99; | ||
| opacity: .68; | ||
| transition: opacity .15s $out-quad !important; | ||
| transition: background .15s $out-quad !important; | ||
|
|
||
| @if $variant != 'indigo' { | ||
| @extend %hide-controls; | ||
|
|
@@ -156,31 +158,36 @@ | |
|
|
||
| &:hover { | ||
| transition: all .25s ease-out; | ||
| opacity: 1; | ||
| background: $splitter-color; | ||
| } | ||
| } | ||
|
|
||
| %igx-splitter-bar--focus { | ||
| // Remove the default browser outline styles | ||
| outline: transparent solid rem(1px); | ||
| box-shadow: inset 0 0 0 rem(1px) var-get($theme, 'focus-color'); | ||
| outline: none; | ||
| box-shadow: 0 0 0 rem(2px) var-get($theme, 'focus-color'); | ||
| transition: box-shadow .15s ease-in; | ||
| z-index: 100; | ||
|
|
||
| @if $variant == 'indigo' { | ||
| box-shadow: none; | ||
|
|
||
| %indigo-splitter-bar { | ||
| background: var-get($theme, 'focus-color'); | ||
| border-color: var-get($theme, 'focus-color'); | ||
|
|
||
| &.igx-splitter-bar--collapsible { | ||
| @extend %show-controls; | ||
| @extend %expand-bars; | ||
| } | ||
| %indigo-splitter-bar.igx-splitter-bar--collapsible { | ||
| @extend %show-controls; | ||
| @extend %expand-bars; | ||
| } | ||
| } | ||
|
|
||
| &:hover { | ||
| box-shadow: none; | ||
| transition: box-shadow .25s ease-out; | ||
| } | ||
| } | ||
|
|
||
| %igx-splitter-bar--active { | ||
| background: var-get($theme, 'bar-color-active'); | ||
| } | ||
|
|
||
| %igx-splitter-bar--vertical { | ||
| padding-inline: rem(1px); | ||
| flex-direction: column; | ||
| height: 100%; | ||
|
|
||
|
|
@@ -202,6 +209,10 @@ | |
| border-radius: var-get($theme, 'border-radius'); | ||
| } | ||
|
|
||
| %igx-splitter-handle--active { | ||
| background: var-get($theme, 'handle-color-active'); | ||
| } | ||
|
|
||
| %igx-splitter-handle--horizontal { | ||
| width: 25%; | ||
| height: var-get($theme, 'size'); | ||
|
|
@@ -231,7 +242,7 @@ | |
| } | ||
|
|
||
| %igx-splitter-expander--start { | ||
| border-bottom: var-get($theme, 'size') solid var-get($theme, 'expander-color'); | ||
| border-block-end: var-get($theme, 'size') solid var-get($theme, 'expander-color'); | ||
|
|
||
| &::before { | ||
| @extend %igx-splitter-hitbox; | ||
|
|
@@ -242,9 +253,12 @@ | |
| } | ||
| } | ||
|
|
||
| %igx-splitter-expander--start--active { | ||
| border-block-end-color: var-get($theme, 'expander-color-active'); | ||
| } | ||
|
|
||
| %igx-splitter-expander--end { | ||
| border-bottom: unset; | ||
| border-top: var-get($theme, 'size') solid var-get($theme, 'expander-color'); | ||
| border-block-start: var-get($theme, 'size') solid var-get($theme, 'expander-color'); | ||
|
|
||
| &::before { | ||
| @extend %igx-splitter-hitbox; | ||
|
|
@@ -255,10 +269,14 @@ | |
| } | ||
| } | ||
|
|
||
| %igx-splitter-expander--end--active { | ||
| border-block-start-color: var-get($theme, 'expander-color-active'); | ||
| } | ||
|
|
||
| %igx-splitter-expander--start-vertical { | ||
| border-top: var-get($theme, 'size') solid transparent; | ||
| border-block-start: var-get($theme, 'size') solid transparent; | ||
| border-inline-end: var-get($theme, 'size') solid var-get($theme, 'expander-color'); | ||
| border-bottom: var-get($theme, 'size') solid transparent; | ||
| border-block-end: var-get($theme, 'size') solid transparent; | ||
| border-inline-start: unset; | ||
|
|
||
| &::before { | ||
|
|
@@ -270,10 +288,15 @@ | |
| } | ||
| } | ||
|
|
||
| %igx-splitter-expander--start-vertical--active { | ||
| border-block-end-color: transparent; | ||
| border-inline-end-color: var-get($theme, 'expander-color-active'); | ||
| } | ||
|
|
||
| %igx-splitter-expander--end-vertical { | ||
| border-top: var-get($theme, 'size') solid transparent; | ||
| border-block-start: var-get($theme, 'size') solid transparent; | ||
| border-inline-end: unset; | ||
| border-bottom: var-get($theme, 'size') solid transparent; | ||
| border-block-end: var-get($theme, 'size') solid transparent; | ||
| border-inline-start: var-get($theme, 'size') solid var-get($theme, 'expander-color'); | ||
|
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. var-get($theme, 'size') is used in a lot of places; better store it in a variable |
||
|
|
||
| &::before { | ||
|
|
@@ -284,4 +307,9 @@ | |
| width: calc(#{map.get($theme, 'size')} * 3); | ||
| } | ||
| } | ||
|
|
||
| %igx-splitter-expander--end-vertical--active { | ||
| border-block-start-color: transparent; | ||
| border-inline-start-color: var-get($theme, 'expander-color-active'); | ||
| } | ||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.