-
Notifications
You must be signed in to change notification settings - Fork 74
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
feat: improve px2rem, support selector_black_list and selector_white_list #1043
Conversation
WalkthroughThe changes in the Mako project streamline the transformation process. Changes
Poem
Note Pull Request Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://coderabbit.ai Files selected for processing (2)
TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
// TODO: FIXME | ||
// 如果有多个 selector,应该「全满足 whitelist」且「全不满足 blacklist」时才做 transform |
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.
这个,参考注释,所以 curr_selector 应该是 curr_selectors。
// TODO: should have performance issues, need benchmark | ||
let re = Regex::new(pattern).unwrap(); | ||
re.is_match(selector) |
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.
Regex 大量初始化会有性能问题,之前遇到过,在 fn new 里先初始化好,存 struct 里,这里只做匹配就好。
Close #978
Close #920
背景
px2rem 是移动端的一个功能,会基于配置把 px 转成 rem。目前的实现比较简单,需要做一些补充和完善。
#920
#921
Summary by CodeRabbit
Px2Rem
instance creation for simpler initialization.