-
Notifications
You must be signed in to change notification settings - Fork 456
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
Changes from 9 commits
61bdea3
b705737
254fd2b
24f2964
f59f038
44452e9
c027962
0d0c110
5599d01
e357f85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,7 @@ | ||
| function hyphenToCamelCase(name: string) { | ||
| const camel = name | ||
| .replace(/^-(\w)/, (_, c) => c) | ||
| .replace(/-(\w)/g, (_, c) => c.toUpperCase()); | ||
| return camel === "float" ? "_float" : camel; | ||
| import { hyphenToCamelCase } from "../utils/css.js"; | ||
| export function camelToHyphenCase(name: string): string { | ||
|
||
| const dashPrefix = name.startsWith("webkit") ? "-" : ""; | ||
| return dashPrefix + name.replace(/[A-Z]/g, (c) => "-" + c.toLowerCase()); | ||
| } | ||
|
|
||
| export function generateWebIdlFromCssProperties(properties: string[]): string { | ||
|
Contributor
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. This is webref specific and I'd rather keep it here. Maybe import the case conversion function?
Contributor
Author
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. Done
Contributor
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. Eh, actually, the utils/css module is totally unused. Let's remove that and keep this one.
Contributor
Author
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. I have updated it @saschanaz |
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.