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

Shorthand and longhand styleguide entry #1891

Merged
merged 5 commits into from
Oct 15, 2024
Merged
Changes from 3 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
9 changes: 9 additions & 0 deletions docs/guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,15 @@ Omit "is used" where there's no loss in meaning.
For example, prefer "The feature reads…" over "The feature is used to read…"
([#727](https://github.com/web-platform-dx/web-features/pull/727#discussion_r1537635981))

#### longhands and shorthands

Prefer the terms "shorthand" and "longhand" to describe the relationship between CSS properties that combine multiple properties into a single declaration and the individual properties.
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer assumes that these terms are better than another alternative. But this sentence doens't mention an alternative. So let's use "use" instead. We can also use "properties" here directly, since we are later saying that we shouldn't forget it.

Suggested change
Prefer the terms "shorthand" and "longhand" to describe the relationship between CSS properties that combine multiple properties into a single declaration and the individual properties.
Use the phrases "shorthand property" and "longhand property" to describe the relationship between CSS properties that combine multiple properties into a single declaration and the individual properties.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree on "use". I'd prefer not to refer to it as a phrase with "property", because "The property is a shorthand" is valid, for instance.


Avoid using these terms without the word "property", so prefer "The `text-wrap` CSS property is a shorthand" over "The `text-wrap` CSS shorthand", and "It is a longhand property of..." over "It is a longhand of".
Copy link
Contributor

Choose a reason for hiding this comment

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

Some formatting helps parse this sentence:

Suggested change
Avoid using these terms without the word "property", so prefer "The `text-wrap` CSS property is a shorthand" over "The `text-wrap` CSS shorthand", and "It is a longhand property of..." over "It is a longhand of".
Avoid using "shorthand" and "longhand" without the word "property":
* Prefer "The `text-wrap` CSS property is a shorthand" over "The `text-wrap` CSS shorthand".
* Prefer "It is a longhand property of" over "It is a longhand of".


Avoid the phrase "constituent properties" for longhand properties, even though this is common on MDN Web Docs.
([#1764](https://github.com/web-platform-dx/web-features/pull/1764#discussion_r1777335770))

#### platform

"platform" is often vague.
Expand Down