-
Notifications
You must be signed in to change notification settings - Fork 455
Refactor CSS utility functions and remove unused files #2217
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
Conversation
|
Thanks for the PR! This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged. |
| return camel === "float" ? "_float" : camel; | ||
| } | ||
|
|
||
| export function generateWebIdlFromCssProperties(properties: string[]): string { |
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.
This is webref specific and I'd rather keep it here. Maybe import the case conversion function?
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.
Done
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.
Eh, actually, the utils/css module is totally unused. Let's remove that and keep this one.
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.
I have updated it @saschanaz
Co-authored-by: Kagami Sascha Rosylight <saschanaz@outlook.com>
Removed the camelToHyphenCase function from css.ts.
|
#2218 started to use hyphenToCamelCase, merging this would break it |
I will later update it in the other PR. You can merge this now |
|
Why remove it when we need it? |
|
I have added it @saschanaz |
src/build/webref/css.ts
Outdated
| @@ -1,4 +1,4 @@ | |||
| function hyphenToCamelCase(name: string) { | |||
| export function hyphenToCamelCase(name: string): string { | |||
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.
I thought only webref would use it, thus the build/webref/css. If not it should be in build/utils/css.
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.
done
|
Is there anything missing here @saschanaz |
src/build/webref/css.ts
Outdated
| .replace(/-(\w)/g, (_, c) => c.toUpperCase()); | ||
| return camel === "float" ? "_float" : camel; | ||
| import { hyphenToCamelCase } from "../utils/css.js"; | ||
| export function camelToHyphenCase(name: string): string { |
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.
We don't use this one, right?
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.
Yup, I have updated it
Removed the camelToHyphenCase function from css.ts.
|
LGTM |
|
There was an issue merging, maybe try again saschanaz. Details |
|
Did you forget this @jakebailey |
No description provided.