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 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
7 changes: 7 additions & 0 deletions docs/guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,13 @@ 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

In CSS, use 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
Collaborator

Choose a reason for hiding this comment

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

Contrasting with what not to do would be cool, here I think.

Also, I'd been using sembr in this file, or at least one-sentence per line. I don't feel strongly on that point though.

One thing is left unanswered: should I use "longhand properties" or "longhands". I think I prefer the former, but I'd like to know whether I am alone in this. 😅

Suggested change
In CSS, use the terms "shorthand" and "longhand" to describe the relationship
between CSS properties that combine multiple properties into a single
declaration and the individual properties.
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.
Avoid the phrase "constituent properties" for longhand properties, even though this is common on MDN Web Docs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

One thing is left unanswered: should I use "longhand properties" or "longhands". I think I prefer the former, but I'd like to know whether I am alone in this. 😅

I added a bit of clarification here-

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".

I think what matters is that shorthand and longhand don't replace the word "property" but rather clarify the type of property, but we don't need to say "*hand property" in that order, necessarily.

([#1764](https://github.com/web-platform-dx/web-features/pull/1764#discussion_r1777335770))

#### platform

"platform" is often vague.
Expand Down