Skip to content

Commit ae57ee3

Browse files
committed
Add Objects layer
1 parent 6e03fbc commit ae57ee3

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* ==========================================================================
2+
#CONTAINER-OBJECT
3+
========================================================================== */
4+
5+
.o-container {
6+
@include spacing-sides;
7+
8+
width: 100%;
9+
max-width: 1200px;
10+
margin-right: auto;
11+
margin-left: auto;
12+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/* ==========================================================================
2+
#MODAL-OBJECT
3+
========================================================================== */
4+
5+
.o-modal {
6+
@include basic-transition(transform, $duration: 0.5s);
7+
8+
position: fixed;
9+
z-index: map-get($z-layers, modal);
10+
left: 50%;
11+
top: 50%;
12+
display: none;
13+
width: 600px;
14+
max-width: 90%;
15+
max-width: calc(100% - #{$spacing-lg});
16+
max-height: 90%;
17+
max-height: calc(100% - #{$spacing-lg});
18+
overflow-x: hidden;
19+
overflow-y: auto;
20+
transform: translate(-50%, -200vh);
21+
transform: translate(-50%, calc(-100vh - 105%));
22+
will-change: transform;
23+
pointer-events: none;
24+
-webkit-overflow-scrolling: touch;
25+
26+
@supports (pointer-events: auto) {
27+
display: block;
28+
pointer-events: none;
29+
}
30+
31+
@include mq($from: tablet) {
32+
max-width: calc(100% - #{$spacing-lg * 2});
33+
max-height: calc(100% - #{$spacing-lg * 2});
34+
}
35+
36+
@include mq($from: desktop) {
37+
max-width: calc(100% - #{$spacing-xl * 2});
38+
max-height: calc(100% - #{$spacing-xl * 2});
39+
}
40+
41+
&.is-active {
42+
transform: translate(-50%, -50%);
43+
pointer-events: auto;
44+
}
45+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* ==========================================================================
2+
#WRAPPER-OBJECT
3+
========================================================================== */
4+
5+
.o-wrapper {
6+
flex: 1 0 auto;
7+
overflow: visible;
8+
}

0 commit comments

Comments
 (0)