Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Merged
Changes from all commits
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
1 change: 1 addition & 0 deletions src/extensions/default/CSSCodeHints/CSSProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
"page-break-inside": {"values": ["auto", "avoid", "inherit"]},
"perspective": {"values": ["none"]},
"perspective-origin": {"values": ["bottom", "center", "left", "right", "top"]},
"pointer-events": {"values": ["auto", "none", "visiblePainted", "visibleFill", "visibleStroke", "visible", "painted", "fill", "stroke", "all", "inherit"]},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One small nit: The properties are not alphabetically sorted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ahh, thanks for catching that. I just added them in order listed on the MDN

https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events

Would you want me to submit another PR with them alphabetized? I'm happy to do so.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes please. All the other properties values are alphabetized.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@TomMalbran Fwiw, I'm pretty sure the order doesn't matter (other than for code cleanliness)... afaict the only place this is consumed is in CssPropHints.getHints(), which sort()s the array before use -- see line 255. (And in the future even that probably won't matter because we'll eventually be re-sorting the results based on StringMatch ranking).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

But maybe it's easier to see if a propertie value exists when you look for it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, we are sorting them to easily find if a property value exists.

"position": {"values": ["absolute", "fixed", "relative", "static", "sticky", "inherit"]},
"quotes": {"values": ["none", "inherit"]},
"region-break-after": {"values": ["always", "auto", "avoid", "avoid-column", "avoid-page", "avoid-region", "column", "left", "page", "region", "right"]},
Expand Down