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

[RFC] shorthand properties & values should not be the default behavior #133

Closed
siriwatknp opened this issue Jun 10, 2024 · 0 comments · Fixed by #149
Closed

[RFC] shorthand properties & values should not be the default behavior #133

siriwatknp opened this issue Jun 10, 2024 · 0 comments · Fixed by #149
Assignees
Labels
RFC Request For Comments

Comments

@siriwatknp
Copy link
Member

siriwatknp commented Jun 10, 2024

What's the problem?

import { styled } from '@pigment-css/react';

const A = styled.div({
  width: 1,
})

produces CSS width: 100%.

This is too magical and is hard to debug where it comes from.

What are the requirements?

Pigment CSS should not have shorthand properties or values enabled by default. It should be configured explicitly based on the users.

What are our options?

Pigment CSS needs to expose an API to configure the shorthand. I lean toward following Tailwind config so that users can switch between Tailwind and Pigment CSS.

Proposed solution

Remove shorthand properties from the default behavior and let the users configure it explicitly. The API to configure is the next step to think about.

Resources and benchmarks

No response

Search keywords:

@siriwatknp siriwatknp added status: waiting for maintainer These issues haven't been looked at yet by a maintainer RFC Request For Comments labels Jun 10, 2024
@siriwatknp siriwatknp changed the title [RFC] shorthand properties should not be default behavior [RFC] shorthand properties & values should not be the default behavior Jun 10, 2024
@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request For Comments
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants