-
Notifications
You must be signed in to change notification settings - Fork 1
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
New theme: Corner layout #40
base: main
Are you sure you want to change the base?
Changes from 23 commits
69e2847
39e9d3f
fa5c1b1
7754a46
7719cb6
1966be8
495ffec
ef0153b
bdef612
00f39f4
a9725cc
685ae4c
dbe4d73
f1cb189
ffe697f
a6c8f7e
69aa105
796424a
31adad1
92a894e
e21c929
310d87b
8bf7168
e4a0198
580c238
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,100 @@ | ||||
// Base styles | ||||
html.easy-popup-open { | ||||
&:has(.easy-popup-master-corner.open) { | ||||
.easy-popup-master { | ||||
opacity: 0; | ||||
visibility: hidden; | ||||
} | ||||
} | ||||
} | ||||
|
||||
.easy-popup-master-corner { | ||||
transition: opacity 0.4s ease, transform 0.4s ease; | ||||
transform: translateX(0); | ||||
position: fixed; | ||||
bottom: 0; | ||||
right: 0; | ||||
max-width: 450px; | ||||
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. Please note that we are using the library for multiple purposes. So make it as flexible as you can, the |
||||
opacity: 1; | ||||
visibility: visible; | ||||
top: unset; | ||||
left: unset; | ||||
height: unset; | ||||
width: unset; | ||||
display: block; | ||||
|
||||
&:not(.open) { | ||||
pointer-events: none; | ||||
} | ||||
|
||||
.ep-close-button { | ||||
position: fixed; | ||||
transform: translate(0); | ||||
--ep-close-color: #000; | ||||
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. Why do you override this variable here? CSS override should use the same selector when possible. |
||||
} | ||||
|
||||
.easy-popup-overflow { | ||||
overflow: unset; | ||||
} | ||||
|
||||
.easy-popup-container { | ||||
padding: 0; | ||||
|
||||
.easy-popup-inner { | ||||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1); | ||||
border-radius: var(--ep-radius); | ||||
overflow: hidden; | ||||
max-height: calc(100vh - (var(--ep-corner-offset) * 2)); | ||||
overflow-y: auto; | ||||
} | ||||
} | ||||
|
||||
// Position variants | ||||
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. Why do some positions have all top left bottom right properties, while some do not? |
||||
&.top-left { | ||||
top: var(--ep-corner-offset); | ||||
left: var(--ep-corner-offset); | ||||
bottom: unset; | ||||
right: unset; | ||||
} | ||||
|
||||
&.top-right { | ||||
top: var(--ep-corner-offset); | ||||
right: var(--ep-corner-offset); | ||||
bottom: unset; | ||||
} | ||||
|
||||
&.bottom-left { | ||||
bottom: var(--ep-corner-offset); | ||||
left: var(--ep-corner-offset); | ||||
right: unset; | ||||
} | ||||
|
||||
&.bottom-right { | ||||
bottom: var(--ep-corner-offset); | ||||
right: var(--ep-corner-offset); | ||||
} | ||||
|
||||
@media only screen and (max-width: 768px) { | ||||
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. Should this breakpoint be consistent with the mobile layout here easy-popup/src/css/layout-mobile.scss Line 16 in dd83fa3
|
||||
--ep-corner-offset: 0px; | ||||
--ep-padding: 15px; | ||||
padding: var(--ep-padding); | ||||
|
||||
.ep-close-button { | ||||
top: var(--ep-padding); | ||||
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. Do you know the purpose of |
||||
right: var(--ep-padding); | ||||
} | ||||
|
||||
.easy-popup-container .easy-popup-inner { | ||||
max-height: calc(100vh - (var(--ep-padding) * 2)); | ||||
} | ||||
} | ||||
|
||||
// Slide animations | ||||
&[class*="right"]:not(.open) { | ||||
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.
|
||||
transform: translateX(100%); | ||||
} | ||||
|
||||
&[class*="left"]:not(.open) { | ||||
transform: translateX(-100%); | ||||
} | ||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to hide
.easy-popup-master
here?