summaryrefslogtreecommitdiff
path: root/addons/web/static/src/scss/popover.scss
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/web/static/src/scss/popover.scss
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/web/static/src/scss/popover.scss')
-rw-r--r--addons/web/static/src/scss/popover.scss152
1 files changed, 152 insertions, 0 deletions
diff --git a/addons/web/static/src/scss/popover.scss b/addons/web/static/src/scss/popover.scss
new file mode 100644
index 00000000..5914fe51
--- /dev/null
+++ b/addons/web/static/src/scss/popover.scss
@@ -0,0 +1,152 @@
+@keyframes slide-top {
+ 0% {
+ opacity: 0;
+ transform: translateY(-5%);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+
+@keyframes slide-right {
+ 0% {
+ opacity: 0;
+ transform: translateX(5%);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translateX(0);
+ }
+}
+
+@keyframes slide-bottom {
+ 0% {
+ opacity: 0;
+ transform: translateY(5%);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+
+@keyframes slide-left {
+ 0% {
+ opacity: 0;
+ transform: translateX(-5%);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translateX(0);
+ }
+}
+
+.o_popover {
+ $border-color: gray('300');
+ $bg-color: gray('200');
+ $arrow-pad: 8px;
+ $arrow-size: 8px;
+ $animation-time: 0.2s;
+ max-width: 100vw;
+
+ position: fixed;
+ z-index: 1060;
+ border: 1px solid $border-color;
+ background-color: #fff;
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
+
+ .o_popover_header {
+ background-color: gray('200');
+ font-size: 1.1rem;
+ padding: 0.5rem 0.75rem;
+ border-bottom: 1px solid $border-color;
+ &:empty {
+ display: none;
+ }
+ }
+
+ &--top {
+ animation: $animation-time slide-top;
+
+ &::before,
+ &::after {
+ content: '';
+ position: absolute;
+ top: 100%;
+ left: 50%;
+ margin-left: -$arrow-size;
+ border: $arrow-size solid transparent;
+ border-top-color: $bg-color;
+ }
+
+ &::before {
+ margin-top: 1px;
+ border-top-color: $border-color;
+ }
+ }
+
+ &--right {
+ animation: $animation-time slide-right;
+
+ &::before,
+ &::after {
+ content: '';
+ position: absolute;
+ top: 50%;
+ right: 100%;
+ margin-top: -$arrow-size;
+ border: $arrow-size solid transparent;
+ border-right-color: $bg-color;
+ }
+
+ &::before {
+ margin-right: 1px;
+ border-right-color: $border-color;
+ }
+ }
+
+ &--bottom {
+ animation: $animation-time slide-bottom;
+
+ &::before,
+ &::after {
+ content: '';
+ position: absolute;
+ bottom: 100%;
+ left: 50%;
+ margin-left: -$arrow-size;
+ border: $arrow-size solid transparent;
+ border-bottom-color: $bg-color;
+ }
+
+ &::before {
+ margin-bottom: 1px;
+ border-bottom-color: $border-color;
+ }
+ }
+
+ &--left {
+ animation: $animation-time slide-left;
+
+ &::before,
+ &::after {
+ content: '';
+ position: absolute;
+ top: 50%;
+ left: 100%;
+ margin-top: -$arrow-size;
+ border: $arrow-size solid transparent;
+ border-left-color: $bg-color;
+ }
+
+ &::before {
+ margin-left: 1px;
+ border-left-color: $border-color;
+ }
+ }
+}