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

feat(css): add field-sizing property #718

Merged
merged 4 commits into from
Apr 25, 2024
Merged

Conversation

chrisdavidmills
Copy link
Contributor

Description

Chrome 123 supports the field-sizing property, which is used to size textual form elements and textareas by their content, rather than sticking to a fixed size. This PR adds data for the new property.

Motivation

Additional details

Related issues and pull requests

@caugner caugner changed the title Add field-sizing property feat(css): add field-sizing property Apr 8, 2024
@dipikabh dipikabh self-assigned this Apr 11, 2024
Copy link
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

Hi @chrisdavidmills, I have some concerns about the appliesto value. I'm wondering if it’s worth all the effort to perfect it. What do you think?

css/properties.json Outdated Show resolved Hide resolved
"CSS Basic User Interface"
],
"initial": "normal",
"appliesto": "textFields",
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure about this appliesto value.

  • Spec says "Applies to: elements with default preferred size"
  • We don't have any such value defined for appliesto in our schema. The closest sounding ones seem to be:
    • "elementsThatAcceptInput" and
    • "elementsForWhichSizeContainmentCanApply" that's been used for contain-intrinsic-size.

Do we need a schema update to add something like "elementsWithDefaultPreferredSize"?

  • OTOH, the only other place where "textFields" has been used is
    "appliesto": "textFields",
    which points to an MDN page that does not exist:

"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/ime-mode"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this wasn't great. I've added the suggested value elementsWithDefaultPreferredSize to the schema and the l10n CSS file, and used it for field-sizing.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's great, thanks!

Copy link
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

Thanks for the updates and addressing the comments!

@dipikabh dipikabh merged commit 3df37e7 into mdn:main Apr 25, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants