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

Please add "option", "fallback" properties for amp html to whitelist #2224

Closed
ka2jun8 opened this issue Jan 26, 2021 · 2 comments · Fixed by #2232
Closed

Please add "option", "fallback" properties for amp html to whitelist #2224

ka2jun8 opened this issue Jan 26, 2021 · 2 comments · Fixed by #2232

Comments

@ka2jun8
Copy link
Contributor

ka2jun8 commented Jan 26, 2021

The problem

When we use styled-components and amp , the needed properties for amp are not rendered,
because @emotion/is-prop-valid does not allow these properties.

Proposed solution

I would like to add properties option, fallback in packages/is-prop-valid/src/props.js.

Alternative solutions

workaround is like this:

  const Parent = styled.div`
     .option {
        color: red;
      }
  `

  <Parent>
    <div className="option" option="sample">color is red</div>
  </Parent>

But we need a useless DOM.

Additional context

Almost same situations here:

Reference:

Example:
https://codesandbox.io/s/magical-tharp-9kutn?file=/src/App.js

@Andarist
Copy link
Member

@probablyup any objections against adding those? I personally have unpleasant sensations in my stomach when I think about adding amp-related props but we've done that in the past so 🤷‍♂️

@quantizor
Copy link
Contributor

@Andarist I think it's fine; y'all should consider considering transient props in v12 so you can drop this whitelist though IMO

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

Successfully merging a pull request may close this issue.

3 participants