Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support forrem values in gap and peek#599

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
krmax44 wants to merge1 commit intoglidejs:master
base:master
Choose a base branch
Loading
fromkrmax44:relative-sizes

Conversation

@krmax44
Copy link

This allows the use of relative sizes withrem inpeek andgap instead of just pixel units.

samuelfullerthomas reacted with heart emoji
@krmax44
Copy link
Author

hey@jedrzejchalubek, do you have some time to review/merge this?

*@param {Glide} glide
*@returns {Number}
*/
exportfunctiontoPx(value){

Choose a reason for hiding this comment

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

I think this logic here can be simplified following way:

exportfunctiontoPx(value){if(value.endsWith('rem')){const{ fontSize}=window.getComputedStyle(document.documentElement)returntoInt(int*toFloat(fontSize))}returntoInt(value)}

Choose a reason for hiding this comment

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

Other than that looks LGTM :)

Copy link
Author

Choose a reason for hiding this comment

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

@jedrzejchalubek Sorry for getting back so late! This would unfortunately cause an error whenevervalue is not astring, though.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@jedrzejchalubekjedrzejchalubekAwaiting requested review from jedrzejchalubek

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@krmax44@jedrzejchalubek

[8]ページ先頭

©2009-2025 Movatter.jp