Skip to content

Commit be1df47

Browse files
committed
Add transition to flyout
1 parent 1d5c976 commit be1df47

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

nebula-components/components/_flyout.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,30 @@
66

77
.#{$nb-namespace}c-flyout.is-open > .#{$nb-namespace}c-flyout__content {
88
transform: scale(1);
9+
opacity: 1;
10+
transition: transform $nb-flyout-transition-duration, opacity $nb-flyout-transition-duration;
911
}
1012

1113
.#{$nb-namespace}c-flyout__content {
1214
position: absolute;
1315
z-index: 1;
1416
width: $nb-flyout-width;
1517
max-width: calc(100vw - #{$nb-spacing-unit-double});
18+
opacity: 0;
1619
transform: scale(0);
1720
}
1821

22+
.#{$nb-namespace}c-flyout__content--transition {
23+
}
24+
1925
.#{$nb-namespace}c-flyout__toggle {
2026
background-color: transparent;
2127
}
2228

2329
.#{$nb-namespace}c-flyout__content--ne {
2430
bottom: calc(100% + #{$nb-spacing-unit-half});
2531
left: 0;
32+
transform-origin: 0 100%;
2633

2734
&::after {
2835
@include nb-triangle(down);
@@ -32,6 +39,7 @@
3239
.#{$nb-namespace}c-flyout__content--se {
3340
top: calc(100% + #{$nb-spacing-unit-half});
3441
left: 0;
42+
transform-origin: 0 0;
3543

3644
&::after {
3745
@include nb-triangle(up);
@@ -41,6 +49,7 @@
4149
.#{$nb-namespace}c-flyout__content--sw {
4250
top: calc(100% + #{$nb-spacing-unit-half});
4351
right: 0;
52+
transform-origin: 100% 0;
4453

4554
&::after {
4655
@include nb-triangle(left);
@@ -50,6 +59,7 @@
5059
.#{$nb-namespace}c-flyout__content--nw {
5160
bottom: calc(100% + #{$nb-spacing-unit-half});
5261
right: 0;
62+
transform-origin: 100% 100%;
5363

5464
&::after {
5565
@include nb-triangle(right);

nebula-components/settings/_globals.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
$nb-border-radius: 0.3rem !default;
2-
$nb-transition-duration: 0.2s !default;
2+
$nb-transition-duration: 0.3s !default;
33
$nb-nav-bp-key: 'nav';
44

55
$nb-active-border-width: ($nb-spacing-unit / 3) !default;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
$nb-flyout-width: 160px !default;
2+
$nb-flyout-transition-duration: $nb-transition-duration !default;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy