Skip to content
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

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

New theme: Corner layout #40

wants to merge 25 commits into from

Conversation

vandangnhathung
Copy link
Contributor

Add new theme corner with 4 positions: top left, top right, bottom left, bottom right (default)

Corner layout

image

Copy link

netlify bot commented Nov 20, 2024

Deploy Preview for easy-popup ready!

Name Link
🔨 Latest commit 580c238
🔍 Latest deploy log https://app.netlify.com/sites/easy-popup/deploys/67863f244c9a640008caeaa0
😎 Deploy Preview https://deploy-preview-40--easy-popup.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@vandangnhathung vandangnhathung self-assigned this Nov 20, 2024
Copy link
Member

@phucbm phucbm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check my comments.
Also make sure that we can see demos for all new options, for example, I don't see demo for cornerFade:true.

html.easy-popup-open {
&:has(.easy-popup-master-corner.open) {
.easy-popup-master {
opacity: 0;
Copy link
Member

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?

position: fixed;
bottom: 0;
right: 0;
max-width: 450px;
Copy link
Member

Choose a reason for hiding this comment

The 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 max-width here needs to havea CSS variable for better control.

.ep-close-button {
position: fixed;
transform: translate(0);
--ep-close-color: #000;
Copy link
Member

Choose a reason for hiding this comment

The 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.

}
}

// Position variants
Copy link
Member

Choose a reason for hiding this comment

The 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?

right: var(--ep-corner-offset);
}

@media only screen and (max-width: 768px) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this breakpoint be consistent with the mobile layout here

@media only screen and (max-width: 1023px) {
?

padding: var(--ep-padding);

.ep-close-button {
top: var(--ep-padding);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know the purpose of --ep-padding? Just because they need the same value, doesn't mean they should share the same variable.

}

// Slide animations
&[class*="right"]:not(.open) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[class*="right"] and [class*="right"] are very risky and less accurate selectors. You should create class is-slide-rlt and is-slide-ltr for this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants