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: add default value to opacity and space of paragraph element #383

Merged
merged 3 commits into from
Oct 26, 2022

Conversation

seanwu1105
Copy link
Contributor

@seanwu1105 seanwu1105 commented Oct 18, 2022

πŸ“‘ Description

Add default value to opacity and space of paragraph element. Thus, the user does not have to specify these properties for every <P> element.

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • I have checked the page with https://validator.unl.edu/
  • All the tests have passed
  • My pull request is based on the latest commit (not the npm version).

β„Ή Additional Information

@vercel
Copy link

vercel bot commented Oct 18, 2022

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated
flowbite-svelte βœ… Ready (Inspect) Visit Preview Oct 18, 2022 at 5:29AM (UTC)
flowbite-svelte-update βœ… Ready (Inspect) Visit Preview Oct 18, 2022 at 5:29AM (UTC)

@shinokada
Copy link
Collaborator

Can you run npm run gen:props and commit and push it again?
This will update the props automatically.

@shinokada
Copy link
Collaborator

We intentionally leave both props undefined for these lines:

(opacity && colorAndopacity) || (color && color)
...
space && spaces[space],
  1. You don't need to specify these props. It is 100% and normal as the browser default.
  2. If you specify it the above lines will break.

@seanwu1105
Copy link
Contributor Author

I get the warning message without the default values. Maybe we can set the default values to undefined.

Screenshot from 2022-10-18 00-59-02
Screenshot from 2022-10-18 01-00-26

@shinokada
Copy link
Collaborator

The warnings come during the development. You can build it and check it again.

npm run build
npm run preview

@seanwu1105
Copy link
Contributor Author

Though the warning disappears after build, I think it is still annoying to show the warning during development. Especially the paragraph element is really common to use and thus it's likely to generate a bunch of warnings polluting the consult during dev. It would be nice to avoid unnecessary messages.

@shinokada shinokada merged commit fa3c5d8 into themesberg:main Oct 26, 2022
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.

None yet

2 participants