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

Adds a handful of svg props #240

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this file can be removed, or added to a gitignore file.

"editor.formatOnSave": false
}
5 changes: 5 additions & 0 deletions src/css/Properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,11 @@ var Properties = module.exports = {

// C
"caption-side" : "top | bottom",
"calcMode" : "discrete | linear | paced | spline",
"clear" : "none | right | left | both",
"clip" : "<shape> | auto",
"-webkit-clip-path" : "<clip-source> | <clip-path> | none",
"clipPathUnits" : "userSpaceOnUse | objectBoundingBox",
"clip-path" : "<clip-source> | <clip-path> | none",
"clip-rule" : "nonzero | evenodd",
"color" : "<color>",
Expand All @@ -172,6 +174,8 @@ var Properties = module.exports = {
"cue-after" : 1,
"cue-before" : 1,
"cursor" : 1,
"cx" : "<coordinate>",
Copy link
Contributor

Choose a reason for hiding this comment

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

The coordinate would need to be added to ValidationTypes.js . I'll see if I can do that. You're of course also welcome to add it, and a test.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks @frvge,

MDN states the <coordinate> content type's syntax is the same as <length>. I went ahead and added it to be explicit, but could have simply switched out <coordinate> for <length> in Properties.js. Let me know if you have a preference. Otherwise, I added a test for the <coordinate> type.

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM. Thanks.

"cy" : "<coordinate>",

// D
"direction" : "ltr | rtl",
Expand Down Expand Up @@ -386,6 +390,7 @@ var Properties = module.exports = {
"quotes" : 1,

// R
"r" : "<length>",
"rendering-intent" : 1,
"resize" : 1,
"rest" : 1,
Expand Down