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

fix: CSS properties will be passed through in HTML #1437

Merged
merged 4 commits into from
Jul 31, 2023
Merged

Conversation

xiaoiver
Copy link
Contributor

@xiaoiver xiaoiver commented Jul 28, 2023

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / Document optimization
  • TypeScript definition update
  • Refactoring
  • Performance improvement
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#1436

CSS 属性支持透传,最终会体现在容器 DOM 元素的样式上。在下面的例子中,color、fontSize 都会被直接应用:

const html = new HTML({
  style: {
    x: 200,
    y: 100,
    width: 200,
    height: 200,
    innerHTML: 'p1',
    // The followin will override the CSS properties.
    fontSize: '20px',
    textAlign: 'center',
    color: 'red',
  },
});
截屏2023-07-31 上午9 57 17

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@xiaoiver xiaoiver self-assigned this Jul 31, 2023
@xiaoiver xiaoiver added the bug label Jul 31, 2023
@xiaoiver xiaoiver merged commit d64c8b0 into release Jul 31, 2023
2 of 3 checks passed
@xiaoiver xiaoiver deleted the fix-html branch July 31, 2023 02:40
xiaoiver added a commit that referenced this pull request Jul 31, 2023
* fix: CSS properties will be passed through in HTML (#1437)

* fix: css properties will be passed through in HTML #1436

* chore: commit changeset

* chore: update ssr test case for g-webgl

* chore: update docs for HTML

* chore(release): bump version (#1438)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

1 participant