Skip to content

Conversation

@LFDanLu
Copy link
Member

@LFDanLu LFDanLu commented Dec 11, 2025

  • Moves shorthands to top level properties
  • adds MDN links and descriptions
  • various layout/formatting changes as per feedback
  • moves the style macro page to its own "References" category

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@rspbot
Copy link

rspbot commented Dec 11, 2025

@rspbot
Copy link

rspbot commented Dec 11, 2025

@LFDanLu LFDanLu changed the title docs: (WIP) Style macro reference table refactor docs: Style macro reference table refactor Dec 11, 2025
Comment on lines +690 to +695
maxHeight: createSpectrumSizingProperty('maxHeight', (() => {
// auto is not a valid value for maxHeight
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const {auto, ...rest} = height;
return {...rest, none: 'none'};
})()),
Copy link
Member Author

Choose a reason for hiding this comment

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

note this change in the theme, should be pretty minor

Comment on lines 151 to 158
'colors': {
description: 'Transition property for color related properties: color, background-color, border-color, fill, and stroke.'
},
'opacity': {
description: 'Transition property for opacity.'
},
'shadow': {
description: 'Transition property for box-shadow.'
Copy link
Member Author

Choose a reason for hiding this comment

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

Should transition be transitionProperty? The name actually matches the short hand, so is the intent here actually that people would use the transition shorthand and transition isn't actually a property?

@rspbot
Copy link

rspbot commented Dec 12, 2025

@LFDanLu LFDanLu marked this pull request as ready for review December 12, 2025 01:02
@rspbot
Copy link

rspbot commented Dec 12, 2025

@devongovett
Copy link
Member

Is font supposed to be inside color? Shouldn't it be the other way around?

@LFDanLu
Copy link
Member Author

LFDanLu commented Dec 12, 2025

@devongovett my thought was that the shorthands should be listed inside every theme property that they map to since new users would be more likely to search for the CSS properties they are familiar with, and then they'd be able to discover the shorthand upon opening the disclosure for said property.

If we had shorthands as a top level property in the reference, would we then not have the properties they map to as top level properties?

@LFDanLu LFDanLu mentioned this pull request Dec 12, 2025
5 tasks
@LFDanLu
Copy link
Member Author

LFDanLu commented Dec 12, 2025

also TODO: where to put this in the side bar, gets lost in components right now

export default Layout;

export const section = 'Components';
export const section = 'Reference';
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved this to its own section, feel free to weigh in

@rspbot
Copy link

rspbot commented Dec 13, 2025

@rspbot
Copy link

rspbot commented Dec 13, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants