-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style(elements|ino-popover): update design (#974)
BREAKING CHANGE: The `colorScheme` was updated with its possibilities now being `light`, `dark`, and `primary` (default). The equivalent of the old `transparent` option is `light` and needs to be updated accordingly.
- Loading branch information
1 parent
5ad5f90
commit 3b6a756
Showing
18 changed files
with
281 additions
and
114 deletions.
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
@use '../base/mdc-customize'; | ||
@use './new-theme' as theme; | ||
@import '~tippy.js/animations/scale-subtle.css'; | ||
@import '~tippy.js/dist/svg-arrow.css'; | ||
@import '~tippy.js/dist/tippy.css'; | ||
@import '../base/typography'; | ||
|
||
$border-radius: 10px; | ||
$shadow-color: rgba(93, 91, 105, 0.3); | ||
|
||
@mixin tooltip($background-color, $font-color) { | ||
background: $background-color; | ||
color: $font-color; | ||
|
||
& .tippy-content { | ||
background-color: $background-color; | ||
} | ||
|
||
& > .tippy-svg-arrow { | ||
fill: $background-color; | ||
|
||
svg { | ||
fill: $background-color; | ||
} | ||
} | ||
} | ||
|
||
// global styles | ||
.tippy-box { | ||
@include font(sans-serif, m, regular); | ||
border-radius: $border-radius; | ||
z-index: 9999; | ||
} | ||
|
||
.tippy-content { | ||
border-radius: $border-radius; | ||
} | ||
|
||
// set up custom themes for tippy.js | ||
.tippy-box[data-theme~='light'] { | ||
box-shadow: 0 0 15px 0 $shadow-color; | ||
@include tooltip(theme.$white, theme.$black); | ||
|
||
& > .tippy-svg-arrow svg { | ||
filter: drop-shadow(0 -6px 3px $shadow-color); | ||
} | ||
} | ||
|
||
.tippy-box[data-theme~='dark'] { | ||
@include tooltip(theme.$n-9, theme.$white); | ||
} | ||
|
||
.tippy-box[data-theme~='primary'] { | ||
@include tooltip(theme.$p-3, theme.$p-6); | ||
} |
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
25 changes: 4 additions & 21 deletions
25
packages/elements/src/components/ino-popover/ino-popover.scss
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 |
---|---|---|
@@ -1,23 +1,6 @@ | ||
@use '../base/mdc-customize'; | ||
@use '../ino-tooltip/mixins' as tooltip-mixins; | ||
@use '../base/theme'; | ||
@import '~tippy.js/animations/scale-subtle.css'; | ||
// ino-popover & ino-tooltip use the same base-design | ||
@use '../base/tooltip-base'; | ||
|
||
$color-schemes: 'primary', 'secondary', 'light'; | ||
|
||
.ino-popover > * { | ||
border-radius: 6px; | ||
} | ||
|
||
@each $color in $color-schemes { | ||
.ino-popover.ino-popover--color-scheme-#{$color} > * { | ||
@include tooltip-mixins.tooltip( | ||
theme.color($color, light), | ||
theme.color($color, contrast) | ||
); | ||
} | ||
} | ||
|
||
.ino-popover.ino-popover--color-scheme-transparent > * { | ||
@include tooltip-mixins.tooltip(#fff, theme.color(dark)); | ||
.tippy-content { | ||
padding: 0; | ||
} |
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
Oops, something went wrong.